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
PromptInvestigating Warehouse Contention
PromptWorking 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