warehouse-optimization

Optimize data warehouse queries and storage across Snowflake, BigQuery, and Redshift.

6|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/timequity/plugins --skill warehouse-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: warehouse-optimization
Source: https://github.com/timequity/plugins/tree/main/craft-coder/data/warehouse-optimization
Command: npx skills add https://github.com/timequity/plugins --skill warehouse-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps data teams optimize warehouse schemas and queries through partitioning, clustering, and efficient joins.

Core Features & Use Cases

  • Partitioning & Clustering: Examples across Snowflake, BigQuery, and Redshift.
  • Query Optimization: EXPLAIN usage and common issues with performance guidance.
  • Materialized Views & Cost: Recommendations for MV and cost management.

Quick Start

Apply partitioning and optimized queries in your warehouse setup, then use EXPLAIN ANALYZE to verify improvements.

Frequently Asked Questions about warehouse-optimization

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

FAQPage Schema
How do I optimize query performance in Snowflake, BigQuery, or Redshift?

Query optimization improves execution speed and reduces costs through partitioning, clustering, and efficient joins. Use EXPLAIN ANALYZE to identify bottlenecks, apply table partitioning by date or key columns, and cluster related data together. Materialized views cache frequent aggregations to eliminate redundant computation.

What's the best way to partition and cluster a data warehouse table?

Partitioning divides large tables into smaller segments by date, region, or category to limit scans; clustering co-locates related rows for faster retrieval. Snowflake, BigQuery, and Redshift each provide native syntax for both. Choose partition keys matching your query filters and cluster keys on columns frequently used in joins or WHERE clauses.

Can I reduce data warehouse costs through materialized views and query tagging?

Materialized views store precomputed query results, eliminating redundant computation and lowering scan costs. Query tagging labels requests by application or team for cost attribution and monitoring. Combined with partition archival and warehouse scheduling, these controls reduce both storage and compute spending.

How do I use EXPLAIN to diagnose slow warehouse queries?

EXPLAIN generates execution plans showing how the database accesses and joins data. Review the plan to spot full table scans, missing indexes, or inefficient joins. Add partitioning or clustering to high-cost steps; verify improvements by re-running EXPLAIN after optimization.

Does partitioning work the same across Snowflake, BigQuery, and Redshift?

Partitioning exists in all three platforms but uses different syntax and mechanics. Snowflake and Redshift support time-based and range partitioning; BigQuery uses range, time, and ingestion-time partitioning. Each handles pruning automatically; choose strategies matching your query patterns and data distribution.

What monitoring and timeout controls do I need for warehouse performance?

Warehouse scheduling controls when compute resources run, reducing idle costs. Query timeouts prevent runaway requests from consuming resources. Monitoring tracks query latency and resource usage patterns. Combine these with partition archival to manage long-term storage and maintain consistent performance.