D4.2 - OUTLINE BEST PRACTICES FOR SNOWFLAKE PERFORMANCE MANAGEMENT ON VIRTUAL WAREHOUSES Flashcards

1
Q

What are the related query performance techniques associated with the search optimization service?

A
  • Clustering a table

- Creating one or more materialized views (clustered or unclustered)

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

Benefits of clustering a table?

A
  • faster range searches
  • faster equality searches
  • However, a table can be clustered only a single key, which can contain one or more columns or expressions)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Search Optimization Service speeds up?

A
  • Equality searches

- Applies only to all the columns of supported types in a table that has search optimization enabled

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

Materialized view speeds up?

A
  • Both equality and range searches, as well as some sort operations, but only for the subset of rows and columns included in the materialized view
  • Materialized views can also be used to to set a different clustering key on the same source table (or a subset of that table), or in conjunction with flattening JSON/ variant data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the ‘Query Profile’ ?

A
  • Query Profile provides a graphical representation of the main components of the processing plan for a selected query, with statistics for each component, along with details and statistics for the overall query
  • It is designed to help you spot typical mistakes in SQL query expressions and/or to identify potential performance bottlenecks and improvement opportunities
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Caching

A

Metadata cache: managed by Snowflake automatically, so it doesnt use compute to provide range values like min, max, row counts, etc

Query Cache: results of a query, good for 24 hours, unless underlying data changes, 24 hour clock restarts if the query is re-executed within the 24-hour period up to a max of 31 days

Warehouse cache: resets when warehouse is suspended. Size of cache is determined by size of warehouse. Provides improved performance for subsequent queries if they can read from cache instead of tables

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