Virtual Warehouses

A warehouse is a one or more cluster for computing resources. Warehouses are used by snowflake to perform queries and other DML operations. Snowflake supports creating warehouses for several purposes :

  1. data loading
  2. data analysis
  3. maintain development and testing environment separate from production

Warehouses come in different sizes: small, medium and large.  The size determines the number of servers in clusters in warehouses. Warehouses can be created or managed using either the web interfaces or SQL.

CREATING WAREHOUSES IN SNOWFLAKE

  1. Go to the warehouse page, and do the following – Got G

create_virtual_warehouse

The above image is when you try to create a warehouse using snowflake. It is important to give your warehouse a name that is descriptive enough, so that you are able to understand it better in later terms. In case, you are creating a multi-cluster warehouse, you can even give name of even more than one clusters.

Understanding the auto resume feature :

This feature is off by default! Snowflake as you know uses the credits only when it is being used for executing queries or any other computation. The reason for using this feature is to make sure that we are using snowflake credits only when it is being used.

Behavior of the snowflake warehouse in auto resume :

  • Queries submitted to warehouse that is in auto-resume state will be queued until the warehouse transitioned into a STARTED state.
  • Queries that are waiting for the warehouse to be started will not be time out. But, they can be cancelled if required.
  • The time taken to resume the warehouse depends on the availability of resources in the server pool. If there are servers that are already present in the pool, then the warehouse resumption can be completed in some seconds, otherwise it will wait until the warehouse resumption happens again.
  • Warehouse server provisioning has a has a time out value of 18 minutes after which a snowflake provisioning failure incident will be created.

CHOOSING THE SIZE OF WAREHOUSE

Each incremental increase from the size of the warehouse, there is a direct impact on the query performance. To decide on the size of the warehouse, there you can concurrently run queries on different size of the warehouse and check the performance of the queries.

When the warehouse do not have resources for the execution of queries concurrently, the queries are then queued and finally executed. Resizing the queries is completely fine later on in snowflake as well!

Resources :

Snowflake Support

VirtualWarehouses

Happy Learning 🙂



Leave a comment