On-premise systems have many advantages but also have a huge share of challenges—for example, system maintenance, licensing, and software upgrades.
Most businesses are moving to cloud-based platforms to eliminate their challenges in on-premice systems. There are also challenges in moving to cloud technology.
Snowflake is one of the top-most preferred cloud data warehouses. Costing or pricing is a crucial parameter while or before implementing the solution. Snowflake, it is important to understand the costs involved in the Snowflake before implementing a solution.
Before managing your costs, you must understand the unique Snowflake architecture and underlying concepts related to snowflake cost optimization.
The diagram below illustrates the Snowflake 3-Tier Architecture, which consists of three largely independent hardware layers.
The Snowflake Architecture is made up of the following components:
Cloud Services: Which accepts SQL statements and manages the overall system. Compute is billed per-second but the first 10% of compute costs are free.
Virtual Warehouses: Which account for about 90% of all costs and are where most SQL queries are executed. The warehouse cost model is explained below.
Cloud Storage: Which is a fixed cost per terabyte per month, and not a major concern. Of the three areas, the Virtual Warehouse Cost is the most significant, although there are additional potential costs from:
Server-less Features: For example, Snowpipe, Automatic Clustering, Server-less Tasks and Database Replication. These tend to be billed by the second.
Cross Region Transfer Costs: When data is transferred across Snowflake Accounts in different Regions, the Cloud Provider may charge (per gigabyte) for data transferred across Region or Cloud boundary.
Given the extensive insights above, the top tips to optimize warehouse spend include:
Set a STATEMENT TIMEOUT IN SECONDS for every warehouse based on the warehouse size to limit the risk of overspending on an individual query.
Setting the notification thresholds below your hard limit is recommended to avoid running out of capacity. These alerts can be selected at an Account level (comprising all WHs) or for individual warehouses.
With this feature, only metadata is created for the cloned table; it points to the same storage, eliminating the additional storage cost.
Snowflake charges a minimum of 1 minute every time the warehouse is resumed. This means that the user will pay for 1200 seconds of computing cost, which is six times higher than the actual consumption. To avoid such patterns, the user can take respective actions, such as changing the schedules of the query, running in a shared virtual warehouse, etc.