1. Uczyć się
  2. /
  3. Courses
  4. /
  5. Data Pipeline Automation in Snowflake

Connected

Exercise

Investigating slow queries

Harbr's platform team monitors query performance to keep warehouse costs under control. They use a query log to surface the most expensive queries. The logistics.query_log table mirrors the structure of Snowflake's ACCOUNT_USAGE.QUERY_HISTORY view and contains columns query_id, warehouse_name, execution_ms, bytes_scanned, query_type, and status.

Your task is to identify the top 5 slowest queries.

Instrukcje

100 XP
  • Select warehouse_name, execution_ms, and bytes_scanned from logistics.query_log.
  • Order by execution_ms in descending order and limit the results to 5 rows.
Powered by Snowflake