Warehouses Flashcards
What is a virtual warehouse in Snowflake?
A cluster of compute resources including CPU capacity, memory, and temporary storage needed for data operations in Snowflake.
Virtual warehouses are essential for query processing in Snowflake’s architecture.
What are the three stages of Snowflake architecture?
- Database storage
- Query processing
- Cloud services
Each stage serves a specific function in the overall architecture.
What is the purpose of virtual warehouses in Snowflake?
To allow independent scaling of storage and compute resources.
More data can be added to storage without affecting virtual warehouses.
What types of operations require virtual warehouses?
- Querying rows from tables and views
- Updating records
- Loading data into tables
- Unloading data from tables
These operations necessitate compute resources provided by virtual warehouses.
What command is often used before running USE DATABASE in Snowflake?
USE WAREHOUSE
This command is crucial for specifying which warehouse to use for query processing.
What is the default size for warehouses created with the CREATE WAREHOUSE command?
Extra small
This contrasts with the default size for warehouses created via the web interface, which is extra-large.
What is the minimum billing period when starting a warehouse in Snowflake?
60 seconds
Billing operates on a per-second basis after this minimum period.
What should you do to improve performance for larger and more complex queries?
Use larger warehouses
Larger warehouses are beneficial for handling complex queries efficiently.
What happens when a warehouse enters suspended mode?
It can be resumed automatically if the auto-resume feature is enabled.
Otherwise, manual commands are required to resume or suspend the warehouse.
What are multi-cluster warehouses used for?
To scale up compute resources and manage user and query concurrency needs.
They allow for better performance during peak loads.
What are the two modes of operation for multi-cluster warehouses?
- Maximized mode
- Auto-scale mode
Each mode serves different concurrency and resource management needs.
In maximized mode, how are clusters managed?
All clusters within the warehouse are started, providing maximum resources at all times.
This mode is suitable for consistent usage patterns.
What is the difference between scaling up and scaling out?
- Scaling up: Vertical scaling, resizing a warehouse to a larger size.
- Scaling out: Horizontal scaling, adding more clusters to a multi-cluster warehouse.
Each approach addresses different performance issues.
What is the purpose of the economy scaling policy in Snowflake?
To conserve credits by keeping clusters fully-loaded and avoiding starting new clusters unless necessary.
This policy may lead to some queries being queued.
True or False: Scaling out is more effective for handling large complex queries.
False
Scaling out improves concurrency, while scaling up addresses performance for complex queries.