Insights panel
A side panel that tells you where a query's bytes go before you run it, and where its time went after. Cost is broken down per CTE, pipe stage, subquery, and statement, from BigQuery dry runs, so you optimize the section that matters instead of guessing.
Cost Breakdown
Bytes: 3.64 GB
Bytes: 451.39 MB
Bytes: 679.6 MB
Opening it
Any of these opens the panel on the right of the editor:
- The ⋮ menu in the header → Prism Insights
- Right-click in the editor → Show Prism Insights
- F1 in the editor → Show Prism Insights
There is no keyboard shortcut: ⇧⌘I belongs to the browser’s DevTools and a web page can’t take it.
The panel has four views. Wider than 400 px they are tabs; narrower, a dropdown.
| View | When it has content | What it shows |
|---|---|---|
| Costs Debug | After you click Analyze | Bytes and cost per section of the query, from dry runs |
| Execution Plan | After a query runs | Stages, row counts, detected performance issues; see Execution plan |
| Model Hint | Always | Whether on-demand or a reservation would be cheaper for this query; see Pricing comparison |
| Lineage | As you type | Which source columns feed each output column; see Column lineage |
Breaking cost down by section
Click Analyze. Querylab.io splits the query at its execution boundaries (each CTE, each pipe |> stage, each subquery, each set-operation branch, each statement of a script) and dry-runs the query up to each boundary. Dry runs are free. The progress bar counts boundaries as they come back; Cancel stops it.
The result is grouped by kind: CTEs, Pipes, Subqueries, Set Operations, Statements. Each entry shows its bytes, its cost at the tab’s pricing, and its share of the total. The Total Query Estimate box at the top is the dry run of the whole query, the same number the editor’s status bar shows.
Hover an entry for the copy icon: it copies the exact SQL that was dry-run for that section, which is the fastest way to see what “up to this CTE” means.
Same gutter, different entry point: the diamond icons in the editor margin estimate or run a single section without opening the panel; see Partial execution.
Choosing section or column mode
The Mode switch chooses what the analysis breaks down by.
| Mode | Dry runs | Use it for |
|---|---|---|
| Section | One per boundary | Finding the expensive CTE, pipe stage, or statement. The default. |
| Column | One per selected column | Wide tables: which columns of a SELECT list are actually expensive to read |
Column mode replaces the cost breakdown with a Column Cost Breakdown card that has three tabs: By Column (each column’s bytes, with Expensive marked at over 10% of the total and Partition / Cluster columns flagged), JOIN Impact (how each join changes row counts), and By Table. The header counts the dry runs it took.
If you haven’t chosen a mode yet, the panel picks one from the query’s shape and says so under the switch: Auto-selected based on query. The choice you make yourself is remembered.
Propagating filters upstream
Filter Propagation is on by default. When it’s on, a WHERE in a downstream section is applied to the upstream CTEs it filters when they are estimated, the same pushdown BigQuery does at run time. Off, every CTE is estimated as written, which is the number you want when you’re deciding whether a CTE needs its own filter.
Filters combined with OR, or containing a subquery, are not pushed down.