Query too slow? Snowflake can help. Snowflake comes with a set of in-built tools to improve query performance. One of these is the Query Acceleration Service, which can «auto-magically» detect when a difficult query is holding up a warehouse and call in extra compute to help save the day! The Query Acceleration Service is supported in Snowflake Enterprise Edition or higher. Let’s dive in.
How does the Query Acceleration Service work?
I’m glad you asked! The short answer is… it’s a secret. Snowflake is a proprietary piece of software and they don’t want competitors using their ideas and technology. The long answer is… it’s a secret but we can still try to understand it and its limitations.
When you run a query in Snowflake, you depend on a unit of compute called a Virtual Warehouse. Each warehouse can only process one query at a time, meaning that if one particularly chunky query needs to be executed, it could hold up all other queries in the queue, no matter how small they are.
If the QAS is enabled, Snowflake will detect these «outlier» queries and assign compute resources to speed up the process.
Only some queries can be accelerated
Only some queries are eligible for acceleration. In its docs, Snowflake states that supported query types for acceleration include those using highly selective filters (WHERE) or aggregation (GROUP BY). Also, if a query contains a LIMIT clause, then it must also contain an ORDER BY.
Getting Started with Query Acceleration
Snowflake provides various tutorials and documentation pages to help you begin experimenting with QAS