Skip to content
LearningPathX
Learning PathsFree TestsExam InfoHow it worksNews
Sign inChoose a certification
  1. Home/
  2. Certifications/
  3. COF-C03/
  4. COF-C03 Learning Path/
  5. Study FAQs/
  6. Which Snowflake Query History source should I use?

Study FAQ

Which Snowflake Query History source should I use?

Exam · COF-C03Knowledge domain · Performance Optimization, Querying, and TransformationUpdated Nov 25, 2026
Also asked as 2
  • How do Snowsight, Information Schema, and ACCOUNT_USAGE Query History differ?
  • Where can I look up a recent Snowflake query versus report on longer query history?

Answer

Use Snowsight Query History for a recent query you want to inspect interactively, Information Schema QUERY_HISTORY functions for recent SQL-based investigation, or SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY for account-level trends. Snowsight covers up to 14 days. The table functions cover the last 7 days. The Account Usage view covers 365 days and can lag by up to 45 minutes.

In Snowsight, filter by query ID, status, user, warehouse, statement type, duration, session, or query tag as needed. The active role affects whose queries you can see. Details for queries over seven days old can omit user information, while the user filter remains available. Snowsight uses your current time zone. Normalize timestamps before joining events from several sources.

The Information Schema functions include session, user, and warehouse variants. Supply a small recent time window and a sufficient result limit, since the function applies its time range and result limit before the outer WHERE predicate. For longer reporting, use a role authorized for the Account Usage view. This query lists slow statements visible in the previous 24 hours.

SELECT query_id, user_name, warehouse_name, total_elapsed_time,
       bytes_scanned, error_code
FROM snowflake.account_usage.query_history
WHERE start_time >= DATEADD(hour, -24, CURRENT_TIMESTAMP())
ORDER BY total_elapsed_time DESC
LIMIT 50;

The result ranks elapsed time. Use the query ID and its timing breakdown or profile to find the cause. If a recent query is absent, check the selected account, role, time range, and the view’s update delay.

Snowsight Query History · Information Schema QUERY_HISTORY functions · Account Usage QUERY_HISTORY view

Full explanation

Monitoring Queries, Warehouses, Storage, and Account Activity

Study guide · COF-C03

Read the full explanation →
← Back to COF-C03 FAQsView learning path →

Related questions

How should I set Snowflake warehouse auto-suspend and auto-resume? →When is a Snowflake clustering key worth adding? →Should I use a curated table, dynamic table, or materialized view for repeated Snowflake transformations? →How can I verify that a Snowflake performance change is worth its cost? →How do I diagnose a slow Snowflake query with Query History and Query Profile? →What is the difference between Snowflake persisted query results and the warehouse cache? →
LearningPathX

A focused path to certification, one clear step at a time.

© 2026 LearningPathX. All rights reserved.

Product

CertificationsLearning PathsFree TestsHow it worksNews

Company

SubscriptionHelp centerContact usPrivacyTerms

Follow us

Your privacy choices

We use analytics cookies to understand how LearningPathX is used and improve your learning experience. Analytics will only start after you accept.