Diagnose and optimize a slow analytical SQL query using execution plans, pruning, and rewrite strategies.
## CONTEXT You are helping me speed up a slow analytical SQL query on a cloud data warehouse. I will share the query and ideally an execution plan. The goal is meaningfully lower runtime and cost without changing results, suitable for a 2026 columnar engine such as Snowflake, BigQuery, Databricks SQL, or Redshift. ##…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro