Performance Concepts: Query Optimization Flashcards
History Tab
- Displays query history for the last 14 days
- Users can view other users queries but cannot view their query results
Analysis of Query Duration: Compilation Time
Query engine performing operations like cost based optimization and micropartition pruning
Analysis of Query Duration: Execution Time
Steps to process the data, processing time on the CPU
Query Analysis: Profile Overview: Processing
The percentage of the total execution time spent on data processing by the CPU of the virtual warehouse
Query Analysis: Profile Overview: Local Disk I/O
-The percentage of time processing was blocked by local disk access
- In other words, when the virtual warehouse had to read or write data from the local SSD storage
Query Analysis: Profile Overview: Remote Disk I/O
When the virtual warehouse had to read or write data from the remote storage layer
Database Order of Execution
Rows->Groups->Result
Rows statements
FROM
JOIN
WHERE
Group statements
GROUP BY
HAVING
Result statements
SELECT
DISTINCT
ORDER BY
LIMIT
Bytes spilled to local storage
Volume of data spilled to virtual warehouse local disk
Bytes spilled to remote storage
Volume of data spilled to remote disk.
Caching Layers
Services Layer
Warehouse Layer
Storage Layer
Services Layer Cache Categories
Metadata Cache
Results Cache
Metadata Cache
- highly available service residing in the cloud services layer
- maintains metadata on object information and statistics for each cache type
- sometimes referred to as the metadata store cloud services layer or just services layer