The Snowflake query console
Run read-only Snowflake SQL with an EXPLAIN-based scan estimate, per-tab context, cancel and per-query statistics.
The Snowflake console runs read-only SQL. Several statements can run in sequence in one script, one result per statement. The banner above the editor says so and reminds you that read-only mode is a Tablyne safeguard, so you should use a read-only role as well.
Context in the tab
Each tab has pickers for warehouse, role, database, schema and timeout. Names you type without qualification resolve against that context. Duplicating a tab copies the context.
Estimate before running
Before a SELECT runs, Tablyne asks Snowflake for EXPLAIN USING JSON. The console shows the bytes and partitions the query would scan, plus the credits per hour of the warehouse size when that size is in the table Tablyne knows. Treat the figure as an upper bound, as the console says. Statements that cannot be explained, such as SHOW, get no estimate. In that case the console says why and the query continues.
The console asks you to confirm in three cases.
- The estimate is above the threshold of the connection.
- The cost of one or more statements in a script is unknown.
- The connection is tagged as production and the warehouse is suspended, so the query would resume it.
You can also run EXPLAIN in a form that shows the plan as JSON, without running the query.
After the query
Results are written to disk as they arrive. If a result is cut, the console says after how many rows. You can load statistics for a query: compile and execution time, bytes scanned, partitions, cache use and spill. They come from Snowflake’s history, which keeps them for a limited time, and the console reports when they are gone.
Cancelling
Cancel sends a request to Snowflake. If Tablyne cannot confirm the cancellation, it says the query may still be running.