optimizing-query-by-id

Analyze and rewrite Snowflake queries by query ID to improve performance.

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/AltimateAI/altimate-opencode-plugin --skill optimizing-query-by-id-altimateai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimizing-query-by-id
Source: https://github.com/AltimateAI/altimate-opencode-plugin/tree/main/skills/snowflake/optimizing-query-by-id
Command: npx skills add https://github.com/AltimateAI/altimate-opencode-plugin --skill optimizing-query-by-id-altimateai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the optimization of Snowflake queries, reducing execution time and improving performance by analyzing and rewriting queries based on their unique ID.

Core Features & Use Cases

  • Performance Analysis: Analyze query performance metrics like time, data scanned, and spillage using query IDs.
  • Bottleneck Identification: Identify bottlenecks in query execution by fetching and analyzing query profiles.
  • Optimization Application: Apply best practices to rewrite queries to improve performance.
  • Use Case: When you have a slow query in Snowflake and need to optimize it quickly.

Quick Start

Optimize the query with ID '12345' by running the optimize-query-by-id skill.

Frequently Asked Questions about optimizing-query-by-id

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a slow Snowflake query using its query ID?

You can optimize a slow Snowflake query using its query ID by analyzing execution metrics, identifying bottlenecks in the query profile, and applying best practices to rewrite the query for better performance.

What metrics are analyzed during Snowflake query performance tuning?

Snowflake query performance tuning analyzes execution time, data scanned, and spillage metrics. By fetching the query profile using the query ID, it identifies specific bottlenecks causing resource utilization issues.

Do I need Snowflake query history to analyze query performance?

Yes, Snowflake query history and statistics are required to analyze query performance. The optimization process relies on accessing this historical data via the query ID to evaluate execution time and resource utilization.

What's the best way to identify bottlenecks in Snowflake query execution?

The best way to identify bottlenecks in Snowflake query execution is by fetching and analyzing the query profile tied to the query ID. This reveals performance issues like data spillage and excessive scanning.

Can I reduce data spillage in Snowflake by rewriting queries?

Yes, you can reduce data spillage in Snowflake by rewriting queries. The optimization process analyzes spillage metrics from the query profile and applies best practices to rewrite the query for improved execution.

Why does my Snowflake query have high resource utilization?

High resource utilization in Snowflake queries often stems from unoptimized execution plans. Analyzing the query profile via the query ID identifies bottlenecks like excessive data scanning, allowing you to rewrite and optimize the query.