
Snowflake Query Size Estimates
Preview query scan estimates in Snowflake, including gigabytes scanned and partition coverage. Learn how admins enable the feature, how to toggle it in a workbook, and why these estimates…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
Greetings. So, last week we implemented this with Steven. We show you how many gigabytes were scanned in Big Query. And this week we did it for Snowflake. Well, I don't even have a PR open yet, but here's what it looks like. So, in this query we scanned 21 gigabytes and 100% of the partitions. And let's just change that to "less than" because that table is kind of automatically partitioned by that ID.
So I'm a little tricky. But we see that 6.5 gigabytes were scanned. This is not to inform you about expenses, because expenses work differently in Snowflake. This is needed to show how much data will be scanned, and therefore, less resources will be left for other queries. Therefore, you should still optimize your queries using partitions and such .
In Big Query, this works automatically with every query, no costs or additional setup required. That is, it is enabled by default. The only thing is, if autorun is disabled, you will get a rating before execution. If autorun is enabled, you will see the actual scan volume. In Snowflake, we need to run a small explain query before the main query to get this data.
So the administrator has to enable this in the connection panel, and there is a toggle in the workbook to estimate the query size. And there is no accurate billing. You would have to go into completely different tables that are updated with a delay to see the actual bytes scanned , as far as I understand. So we will only show the before and after assessment.
It's the same thing before and after execution. Okay, that's all.