Sitemap

Member-only story

My presentation & code snippets from the Snowflake Dutch User Group Meeting

3 min readOct 9, 2024

--

Yesterday I had the pleasure to present my topic ‘optimizing Snowflake from a cost and performance perspective’ at the Dutch User Group. Around 25 people were present, lively discussions plus food & drinks. The session was organized by

and Snowflake’s Jason Teetz at the Dutch Snowflake office.

Press enter or click to view image in full size
Photo by Melissa Scanu

Codesnippets

The result cache

This code snippet shows the result of running a query from the result cache and also the effect of using non deterministic SQL functions in your SQL

alter session set USE_CACHED_RESULT = FALSE;
alter session set query_tag = 'resultcache';
use warehouse benchmark;
alter warehouse benchmark set warehouse_size = XSMALL;

select c.*
from cost.altimate.store_sales_price sp
join cost.altimate.customer c
on sp.ss_customer_sk = c.c_customer_sk
where c_birth_country like '%REP%'
limit 5000000;

-- 12 seconds

alter session set USE_CACHED_RESULT = TRUE;

select c.*
from cost.altimate.store_sales_price sp
join cost.altimate.customer c
on…

--

--

Johan
Johan

Written by Johan

I am a freelance data engineer. My main focus is Snowflake, but I am always eager to learn new things. Python and AWS are my main side interests