Can you show me how to identify expensive SQL queries in our data platform and give me examples of how to fix them
Download run
Fan-out diagram
The searches the AI actually ran for this prompt.
SEED QUERY
Can you show me how to identify expensive SQL queries in our data platform and give me examples of how to fix them
3 real searches · 1 real-search pass
Snowflake QUERY_HISTORY ACCOUNT_USAGE columns bytes_scanned execution_time query examples official docsGoogle ↗
OBSERVED
BigQuery INFORMATION_SCHEMA.JOBS_BY_PROJECT total_bytes_processed total_slot_ms official docsGoogle ↗
OBSERVED
PostgreSQL pg_stat_statements total_exec_time shared_blks_read official docsGoogle ↗
OBSERVED
Badge and edge weight = share of passes that produced the query. Hover a query for its intent and routing format.
Query classes
Google's semantic query class for every sub-query: what kind of answer each search is after, simulated vs real.
Classifying 3 queries…
Searches and sources
ChatGPT3 real searches · gpt-6
Snowflake QUERY_HISTORY ACCOUNT_USAGE columns bytes_scanned execution_time query examples official docs Google ↗
BigQuery INFORMATION_SCHEMA.JOBS_BY_PROJECT total_bytes_processed total_slot_ms official docs Google ↗
PostgreSQL pg_stat_statements total_exec_time shared_blks_read official docs Google ↗
- QUERY_HISTORY view · docs.snowflake.com
- QUERY_HISTORY , QUERY_HISTORY_BY_* · docs.snowflake.com
- JOBS view | BigQuery | Google Cloud Documentation · docs.cloud.google.com
- JOBS view | BigQuery | Google Cloud Documentation · docs.cloud.google.com
Queries
3 queries · click a column to sort
| Query / type | Search | Intent | Query class | Routing format | Cluster | Freq ↓ | Weight |
|---|---|---|---|---|---|---|---|
Snowflake QUERY_HISTORY ACCOUNT_USAGE columns bytes_scanned execution_time query examples official docs OBSERVED | Google ↗ AI Mode ↗ | — | — | — | — | 1x of 1 | |
BigQuery INFORMATION_SCHEMA.JOBS_BY_PROJECT total_bytes_processed total_slot_ms official docs OBSERVED | Google ↗ AI Mode ↗ | — | — | — | — | 1x of 1 | |
PostgreSQL pg_stat_statements total_exec_time shared_blks_read official docs OBSERVED | Google ↗ AI Mode ↗ | — | — | — | — | 1x of 1 |