finding-expensive-queries

Installation
SKILL.md

Finding Expensive Queries

Query history → Rank by metric → Identify patterns → Recommend optimizations

Workflow

1. Ask What to Optimize For

Before querying, clarify:

  • Time period? (last day, week, month)
  • Metric? (execution time, bytes scanned, cost, spillage)
  • Warehouse? (specific or all)
  • User? (specific or all)

2. Find Expensive Queries by Cost

Use QUERY_ATTRIBUTION_HISTORY for credit/cost analysis:

Related skills
Installs
7
GitHub Stars
93
First Seen
Feb 7, 2026