Module 15 · Lesson 12 of 14Detailed study · about 30 min

Query Acceleration and Snowflake Optima

Query Acceleration adds serverless resources to eligible query portions. Optima applies workload-driven optimizations whose availability depends on the capability and warehouse type.

Your learning goal

Investigate QAS eligibility, interpret scale factor as a resource limit and recognize current Optima behavior without promising automatic speedups.

Understand the idea

A concrete example

An occasional report may scan much more data than normal dashboard requests. QAS can offload eligible parallel work instead of sizing every request for that outlier. It requires Enterprise Edition or higher and adds separately billed serverless usage.

Key ideas in simple English
ConceptWhat it means
Eligible portionWork the service can distribute effectively.
Scale factorAn upper bound on QAS resources relative to warehouse size.
OptimaA family of automatic workload optimization capabilities.

Remember: Check eligibility and settings, bound the experiment, then measure actual use and total cost. Treat automatic optimization as observed behavior, not a universal promise.

Explain it step by step · full theory

Learning goals and prerequisites

Investigate QAS eligibility, interpret scale factor as a resource limit and recognize current Optima behavior without promising automatic speedups.

Use the M15_LAB setup from lesson 1. Know SELECT, joins, aggregates and window functions from Modules 03–04. Follow the supplied examples with an authorized warehouse and an isolated learning role. Keep the same data and account context when comparing runs.

Use evidence before enabling QAS

An occasional report may scan much more data than normal dashboard requests. QAS can offload eligible parallel work instead of sizing every request for that outlier. It requires Enterprise Edition or higher and adds separately billed serverless usage.

Inspect eligibility for an actual query. Small scans, insufficient selectivity or unsupported operations may offer no useful work to accelerate. It does not repair incorrect joins or make all operators parallel.

Interpret the resource limit correctly

A scale factor of 2 allows an upper bound relative to warehouse resources; it does not mean a query becomes twice as fast. Actual use depends on eligible work and available service resources. A factor of 0 removes the upper limit and is not a conservative experiment.

Use SYSTEM$ESTIMATE_QUERY_ACCELERATION on a recent completed query. Treat returned estimates as planning evidence, not observed timings. Record the previous warehouse settings before an authorized experiment and restore them afterwards.

Understand Optima’s current scope

Current documentation includes Optima in all editions. Indexing, Metadata and Planning capabilities apply to Gen2 standard and Adaptive Warehouses. Indexing builds best-effort hidden access paths; Metadata improves opportunities such as pruning; Planning learns from previous executions.

Do not generalize this to every warehouse or guarantee a particular optimization. Inspect Query Profile insights for evidence. Directly configured Search Optimization remains a separate choice for workloads requiring explicit control.

Clustering has its own operating model

Optima Clustering is the newer Automatic Clustering implementation. Current documentation describes new clustered tables using it from September 2026 while existing clustered tables remain on Clustering Classic. Use clustering information to identify the table’s behavior.

Do not infer that all clustering maintenance is free because some Optima capabilities are included. Review the applicable service consumption rules and actual usage. Automatic improvements still require correct SQL, sensible workload design and measurement.

Common mistakes and next action

Scale factor limits available resources; eligibility and the rest of the plan determine possible gains.

Check eligibility and settings, bound the experiment, then measure actual use and total cost. Treat automatic optimization as observed behavior, not a universal promise.

Words used in this lesson
Eligible portion
Work the service can distribute effectively.
Scale factor
An upper bound on QAS resources relative to warehouse size.
Optima
A family of automatic workload optimization capabilities.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 4

Query Acceleration and Snowflake Optima

Query history
Eligibility estimate
Cost allowance

Identify outlier

Find a query with substantial eligible parallel work.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify outlier

    Find a query with substantial eligible parallel work.

    Query history → Eligibility estimate → Cost allowance

  2. Offload eligible work

    The warehouse coordinates with service resources; noneligible operators remain.

    Warehouse → Eligible scan work → Serverless resources

  3. Measure

    Compare actual elapsed work and separate service consumption.

    Saved IDs → QAS evidence → No guaranteed multiplier

  4. Observe Optima

    Automatic capabilities depend on warehouse and workload. Inspect insights.

    Warehouse type → Observed insights → Maintain good SQL

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Manual examples for L2_OBJECTS_LAB.M15_LAB. Select an authorized warehouse and a role with database/schema access and permission to create the lab objects. Setup runs once with fresh names. Optional paid services require their stated privileges and edition. SQL and performance timings have not been executed or measured for this lesson.

Estimate a recent query

SQL · example
-- Save the ID immediately after your real workload SELECT:
-- SET candidate_query_id=LAST_QUERY_ID();
-- SELECT SYSTEM$ESTIMATE_QUERY_ACCELERATION($candidate_query_id);
-- Authorized account-wide investigation:
-- SELECT QUERY_ID,WAREHOUSE_NAME,ELIGIBLE_QUERY_ACCELERATION_TIME
-- FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_ACCELERATION_ELIGIBLE
-- WHERE START_TIME>=DATEADD('day',-7,CURRENT_TIMESTAMP())
-- ORDER BY ELIGIBLE_QUERY_ACCELERATION_TIME DESC;

What to expect and why

Use a completed query from the last 14 days for the estimator. Small fixture queries may be ineligible. Account Usage access and latency differ from session-level history.

Optional warehouse settings template

SQL · example
-- Replace M15_AUTHORIZED_WH with an approved dedicated warehouse.
-- SHOW PARAMETERS LIKE '%QUERY_ACCELERATION%' IN WAREHOUSE M15_AUTHORIZED_WH;
-- Record original values before changing anything.
-- ALTER WAREHOUSE M15_AUTHORIZED_WH SET
-- ENABLE_QUERY_ACCELERATION=TRUE QUERY_ACCELERATION_MAX_SCALE_FACTOR=2;
-- Run and measure the same workload; inspect actual acceleration use.
-- Restore the recorded original values after the comparison.

What to expect and why

Requires warehouse modification privileges and a reviewed cost allowance. No warehouse is created or changed by the default learning path.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Does QAS scale factor 2 promise half the runtime?

Try it yourself

Explain why a small cached lookup and a large selective report have different QAS eligibility prospects.

Compare your reasoning

Check eligibility and settings, bound the experiment, then measure actual use and total cost. Treat automatic optimization as observed behavior, not a universal promise.

Key takeaway

Check eligibility and settings, bound the experiment, then measure actual use and total cost. Treat automatic optimization as observed behavior, not a universal promise.

Connect this lesson to the learning path

Official sources and curriculum

Module 15 · See module scope

By Rohit Ray · Independent educational lesson · Explore this visual lab