0
0
Snowflakecloud~5 mins

Query history and profiling in Snowflake - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of query history in Snowflake?
Query history in Snowflake helps you see details about past queries, such as when they ran, how long they took, and if they succeeded or failed. It helps track and troubleshoot query performance.
Click to reveal answer
intermediate
Which Snowflake feature provides detailed information about query execution steps?
The QUERY_HISTORY view shows general query info, but the Query Profile provides detailed execution steps and resource usage for profiling queries.
Click to reveal answer
beginner
How can you filter query history to see only queries from the last 24 hours?
Use a SQL filter on the START_TIME column, for example: WHERE START_TIME > DATEADD(hour, -24, CURRENT_TIMESTAMP()).
Click to reveal answer
intermediate
What key metrics can you find in query profiling to improve performance?
You can find metrics like execution time per step, bytes scanned, rows processed, and wait times. These help identify slow parts and optimize queries.
Click to reveal answer
beginner
Why is it important to monitor query history regularly in Snowflake?
Regular monitoring helps catch inefficient queries early, manage resource usage, and maintain good performance and cost control.
Click to reveal answer
Which Snowflake view shows the general history of executed queries?
AQUERY_PROFILE
BUSER_SESSIONS
CINFORMATION_SCHEMA.TABLES
DQUERY_HISTORY
What does Query Profile provide that QUERY_HISTORY does not?
AList of tables
BUser login details
CDetailed execution steps and resource usage
DWarehouse size
How can you limit query history results to recent queries in SQL?
AUse ORDER BY QUERY_ID
BUse WHERE START_TIME > DATEADD(hour, -24, CURRENT_TIMESTAMP())
CUse LIMIT 10
DUse GROUP BY USER_NAME
Which metric is NOT typically found in query profiling?
AUser password
BBytes scanned
CRows processed
DExecution time per step
Why is query history useful for cost management?
AIt helps identify long-running or resource-heavy queries
BIt shows query text only
CIt lists user emails
DIt controls user access
Explain how you would use Snowflake's query history and profiling features to improve query performance.
Think about how history shows what happened and profiling shows how it happened.
You got /5 concepts.
    Describe the benefits of regularly monitoring query history in Snowflake.
    Consider both performance and cost aspects.
    You got /5 concepts.