The Snowflake optimization and cost management platform. Follow to hear about our latest Snowflake learnings.

🇨🇦 & 🇬🇧
Joined July 2022
In @SnowflakeDB 's latest release, they've given us a nice new set of aggregate functions: min_by and max_by. In this example I look across each user's query history, and find the ID of the first and last queries they executed.
2
2
1
16
15,535
Range joins are notoriously slow in many databases. @SnowflakeDB is no exception. We're using a binned range join technique across a number of models in our @getdbt project and have seen incredible results. A 300x speedup for this query.
1
1
6
565
The function outputs 1 row per operator in your query plan, along with all the stats you see in the UI - data spilled per stage, number of input/output rows, join keys, filter conditions, and so on.
1
116
As of Tuesday, users now have programatic access to all the query performance statistics available in the Query Profile. This is possible through a brand new function, get_query_operator_stats. You can run this function on one query_id at a time:
3
1
11
1,474
The @SnowflakeDB Query Profile is the single best resource you have to understand how Snowflake is executing your query and learn how to improve it.
1
2
11
We all copy & paste code for a living, so lets make it easier for each other.. As of today, all code blocks on our site now have a copy to clipboard option available in the top right corner, so you can spend less time thinking and more time CMD+V'ing. Enjoy 😘
1
6
Cost vs. performance can be determine experimentally. CPU-bound queries will double in speed as the warehouse size increases, up until the point at which they no longer fully utilize the warehouse’s resources. This graph helps you find the sweet spot.
1
1
Snowflake constructs warehouses from compute nodes. Each node has 8 cores/threads, with 16GB of RAM and a 200GB SSD (note: specs very by cloud provider).
1
1
How do you design your table to support multiple, unique access patterns? Recently uncovered a neat trick with materialized views: they can be used to automagically manage multiple versions of your table that are each clustered differently:
2
2
1
13
More good news from @SnowflakeDB this week, they now support the following syntax: select * exclude(column_no_one_asked_for) rename(column_you_wish_you_named_differently_but_cant_cause_its_in_every_dashboard_now) Say hello to cleaner output! S/O to @_jhannan for finding this!
2
1
1
10