Warehouses Flashcards

1
Q

What is a virtual warehouse in Snowflake?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the three stages of Snowflake architecture?

A
  • Database storage
  • Query processing
  • Cloud services

Each stage serves a specific function in the overall architecture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of virtual warehouses in Snowflake?

A

To allow independent scaling of storage and compute resources.

More data can be added to storage without affecting virtual warehouses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What types of operations require virtual warehouses?

A
  • 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command is often used before running USE DATABASE in Snowflake?

A

USE WAREHOUSE

This command is crucial for specifying which warehouse to use for query processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the default size for warehouses created with the CREATE WAREHOUSE command?

A

Extra small

This contrasts with the default size for warehouses created via the web interface, which is extra-large.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the minimum billing period when starting a warehouse in Snowflake?

A

60 seconds

Billing operates on a per-second basis after this minimum period.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What should you do to improve performance for larger and more complex queries?

A

Use larger warehouses

Larger warehouses are beneficial for handling complex queries efficiently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens when a warehouse enters suspended mode?

A

It can be resumed automatically if the auto-resume feature is enabled.

Otherwise, manual commands are required to resume or suspend the warehouse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are multi-cluster warehouses used for?

A

To scale up compute resources and manage user and query concurrency needs.

They allow for better performance during peak loads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two modes of operation for multi-cluster warehouses?

A
  • Maximized mode
  • Auto-scale mode

Each mode serves different concurrency and resource management needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In maximized mode, how are clusters managed?

A

All clusters within the warehouse are started, providing maximum resources at all times.

This mode is suitable for consistent usage patterns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between scaling up and scaling out?

A
  • 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the purpose of the economy scaling policy in Snowflake?

A

To conserve credits by keeping clusters fully-loaded and avoiding starting new clusters unless necessary.

This policy may lead to some queries being queued.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False: Scaling out is more effective for handling large complex queries.

A

False

Scaling out improves concurrency, while scaling up addresses performance for complex queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the suggested best practice for managing warehouses?

A

Have two warehouses: a small one for data loading and a larger one for queries.

This approach balances cost and performance.