optimizing-query-text

Identify and optimize performance bottlenecks in Snowflake SQL queries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the performance bottlenecks in Snowflake SQL queries, enhancing their execution speed and efficiency.

Core Features & Use Cases

  • Query Optimization: Refines SQL queries to improve performance.
  • Performance Analysis: Identifies and resolves performance issues in Snowflake queries.
  • Use Case: When a user has a slow query and needs to optimize it for better performance.

Quick Start

Run the optimizing-query-text skill with your SQL query to get an optimized version.

Frequently Asked Questions about optimizing-query-text

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

FAQPage Schema
How do I optimize slow Snowflake SQL query performance?

Snowflake SQL query performance can be optimized by identifying and resolving execution bottlenecks. This process refines problematic SQL syntax, specifically targeting functions on filter columns and implicit joins, to improve overall execution speed and efficiency.

What are common causes of slow Snowflake SQL queries?

Frequent causes of slow Snowflake SQL queries include implicit joins, NOT IN subqueries, repeated subqueries, and implicit comma joins. Applying functions directly to filter columns also creates performance bottlenecks that degrade execution speed.

What is the best way to tune SQL queries in Snowflake?

The most effective way to tune SQL queries in Snowflake is to analyze the query text for structural inefficiencies. Rewriting implicit comma joins and removing functions from filter columns directly addresses performance issues and accelerates query execution.

Can I optimize Snowflake queries that use NOT IN subqueries?

Yes, Snowflake queries that use NOT IN subqueries can be optimized. This specific subquery pattern is a known performance bottleneck that can be identified and rewritten to significantly improve the query's execution speed and efficiency.

How do repeated subqueries affect Snowflake database performance?

Repeated subqueries degrade Snowflake database performance by forcing the query engine to process redundant operations. Eliminating these repeated subqueries during SQL optimization removes unnecessary computational overhead and improves query execution speed.

Does applying functions to filter columns slow down Snowflake SQL execution?

Yes, applying functions to filter columns slows down Snowflake SQL execution by preventing efficient data scanning. Identifying and removing these functions from filter columns is a primary SQL optimization step to resolve performance bottlenecks.