Snowflake Query Analysis Tool
The Snowflake Query Analysis Tool allows DinoAI to deep-dive into a specific Snowflake query by ID, giving you detailed performance and execution plan statistics to diagnose slow queries and warehouse contention without leaving the Paradime IDE.
This tool bridges the gap between noticing a performance issue and understanding its root cause, enabling DinoAI to analyze execution plans, surface bottlenecks, and suggest concrete fixes β from query rewrites to warehouse configuration changes.
This tool is built for query-level debugging. If you need to explore warehouse metadata or run exploratory SQL, use the Warehouse Tool or SQL Query Tool instead.
Capabilities
The Snowflake Query Analysis Tool fetches detailed execution data for a given Snowflake query ID and returns it as a structured report DinoAI can reason over. Specifically, it:
Breaks down execution time and phase timings
Reports warehouse usage and resource consumption
Surfaces cache efficiency
Includes row counts and partition details
Highlights spill metrics and queue times
Provides operator-level statistics from the execution plan
Using the Snowflake Query Analysis Tool
Open DinoAI in the right panel of the Code IDE
Provide the Snowflake query ID you want to analyze (e.g.,
01a12345-0600-0000-0000-123456789abc)Add your prompt describing what you want DinoAI to focus on β bottlenecks, warehouse sizing, cache usage, and so on
Grant permission when DinoAI asks to access the query data
Review DinoAI's analysis and apply the suggested optimizations
Example Use Cases
Diagnosing a Slow Query
Prompt
Result: DinoAI fetches the execution plan and performance statistics for the query, identifies the most expensive phase or operator, and explains what is causing the slowdown in plain language β along with suggested fixes such as query rewrites, clustering keys, or partition pruning improvements.
Investigating Warehouse Contention
Prompt
Result: DinoAI analyzes the queue and execution time breakdown, assesses whether the query is being held back by warehouse contention or undersizing, and recommends specific warehouse configuration changes such as scaling up, enabling auto-scaling, or adjusting query concurrency settings.
Working with Other Tools
The Snowflake Query Analysis Tool works well alongside DinoAI's other capabilities to support your full debugging and optimization workflow:
Combine with the SQL Execution Tool to re-run an optimized version of the query and validate the performance improvement
Combine with the Warehouse Tool to cross-reference query performance with table metadata, clustering, and partition information
Use alongside Git Lite to commit query or model changes made as a result of the performance analysis
Best Practices
Use the Snowflake query ID β Find the exact query ID in Snowflake's Query History under Activity β Query History to ensure DinoAI analyzes the right execution
Be specific about what to focus on β Tell DinoAI whether you're investigating slow execution, high spill, long queue times, or poor cache efficiency to get the most targeted analysis
Iterate on fixes β After applying a suggested change, re-run the query and analyze the new query ID to validate the improvement
Check spill metrics β High local or remote spill is a common culprit for slow queries; ask DinoAI to highlight spill specifically if you suspect memory pressure
Last updated
Was this helpful?