find_expensive_queries
Identify the most expensive and slowest queries in Snowflake within a configurable lookback period, ranked by elapsed time. Each result shows query text, warehouse, user, elapsed seconds, and data scanned.
Instructions
Find the slowest / most expensive successful queries in the lookback window, ranked by elapsed time. Each result includes a truncated query text preview, warehouse, user, elapsed seconds, and GB scanned.
Args: lookback_days: How many days back to look (default from server config). limit: Max number of queries to return (default from server config, typically 50).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| lookback_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |