COF-C03 exam dumps

COF-C03 practice question 271 of 350

SnowPro® Core Certification (COF-C03). Associate level, Snowflake. Free question with the correct answer and a full explanation.

COF-C03 Question 271

Single answerQuery history

A Snowflake administrator is investigating a performance complaint from an analyst who says a dashboard query ran slowly yesterday afternoon. The administrator needs to identify the exact SQL statement, execution status, start and end times, and the warehouse used for queries run by that analyst during the last 24 hours. Which approach will meet this requirement most directly?

  1. A

    Query the ACCOUNT_USAGE.QUERY_HISTORY view and filter by the analyst's user name and the desired time window.

  2. B

    Run SHOW QUERIES IN ACCOUNT and filter the output for the analyst and time range.

  3. C

    Query the INFORMATION_SCHEMA.TABLES view to find recently accessed tables and infer which query was slow.

  4. D

    Use DESCRIBE HISTORY on the warehouse to return the SQL text, user name, and execution details for all queries.

Show answer and explanation

Correct answer: A

Explanation

To investigate user-reported query performance issues, Snowflake provides query history through dedicated metadata interfaces. The most direct account-level source is SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY, which supports analysis of historical queries with fields such as query text, user, warehouse, status, and timing information. This is appropriate when an administrator needs to investigate queries run by a specific user over a recent period. Snowflake also provides table functions in INFORMATION_SCHEMA for query history, but ACCOUNT_USAGE is a common choice for account-level operational analysis. Best practice is to filter by USER_NAME and time range to narrow the investigation efficiently. Documentation areas relevant to this topic include QUERY_HISTORY in Account Usage and Snowflake metadata/history views and functions.

  • A. Correct.

    Correct. SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY is designed for analyzing historical query activity across the account. It includes columns such as QUERY_TEXT, EXECUTION_STATUS, START_TIME, END_TIME, USER_NAME, and WAREHOUSE_NAME, which directly match the administrator's requirements. Filtering by USER_NAME and a recent time window is a practical way to investigate a reported slow query.

  • B. Incorrect.

    Incorrect. SHOW commands are used for certain object metadata, but there is no standard SHOW QUERIES IN ACCOUNT command for retrieving account-wide historical query details in the way described here. This option reflects a common misconception that all operational history can be accessed with SHOW commands.

  • C. Incorrect.

    Incorrect. INFORMATION_SCHEMA.TABLES contains metadata about tables, not detailed query execution history. Even if the administrator knew which tables were involved, this view would not provide the exact SQL text, execution status, or warehouse used. This distractor targets the misconception that object metadata can substitute for workload history.

  • D. Incorrect.

    Incorrect. DESCRIBE HISTORY is not the mechanism for reviewing query execution history with SQL text and user-level details. Snowflake exposes query history through dedicated history functions and views, not through a warehouse history describe command. This option is plausible because warehouse activity is related to query execution, but it does not provide the requested query history details.

Timed practice exam

Take a COF-C03 practice test under exam conditions

100 questions in 115 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam