SnowPro Associate: Platform Question 52
Single answerQuery historyA Snowflake administrator needs to investigate why a dashboard query ran slowly this morning. The administrator wants to review the exact SQL text, execution status, start and end times, and the warehouse used for the query. Which Snowflake feature is the most appropriate place to get this information for a recent query?
- A
Query History in Snowsight or the QUERY_HISTORY table function/ACCOUNT_USAGE view
- B
Database storage usage views, because they show which SQL statements consumed the most storage
- C
Stage history, because it records all SQL statements executed against tables and views
- D
Access History, because it is the primary source for warehouse execution timing and query status details
Show answer and explanation
Correct answer: A
Explanation
For investigating a recent slow query, Query History is the most appropriate source. In practice, administrators can use Snowsight's Query History interface for visual troubleshooting or query metadata through Snowflake-provided sources such as QUERY_HISTORY table functions in INFORMATION_SCHEMA and the QUERY_HISTORY view in SNOWFLAKE.ACCOUNT_USAGE. These sources provide operational details including query text, user, warehouse, execution status, and timing, which are central to performance investigation. By contrast, storage usage views are for storage metrics, stage history is specific to staged data operations, and access history is primarily for auditing object access rather than core execution troubleshooting.
- A. Correct.
Correct. Query History is designed to review recent query executions, including the SQL text, execution status, timing details, user, and warehouse information. Administrators commonly use Snowsight's Query History page or SQL-accessible metadata such as INFORMATION_SCHEMA table functions and ACCOUNT_USAGE views like QUERY_HISTORY to troubleshoot slow or failed queries.
- B. Incorrect.
Incorrect. Storage usage views focus on storage consumption and related metrics, not operational execution details for individual SQL statements. They do not provide the primary troubleshooting details needed for a slow dashboard query, such as execution status, SQL text, or warehouse used.
- C. Incorrect.
Incorrect. Stage history is related to data loading and unloading activity involving stages, such as COPY operations and staged files. It is not the general-purpose source for reviewing all query executions against tables and views.
- D. Incorrect.
Incorrect. Access History is used mainly for governance and auditing, such as identifying which objects were accessed by a query. While useful for lineage and audit use cases, it is not the main place to review core execution metadata like query timing, status, and warehouse usage for performance troubleshooting.