Courseiva

CCNA Performance Optimization Questions

63 questions · Performance Optimization · All types, answers revealed

1
Multi-Selecthard

Which TWO of the following are common indicators that a query is poorly optimized and requires tuning?

Select 2 answers
A.High remote disk spilling metrics.
B.High query result cache hit rate.
C.Low partition pruning efficiency.
D.Query completes in under 500 milliseconds.
E.Warehouse auto-resume triggers.
AnswersA, C

Remote disk spilling indicates that the query has exhausted its local compute memory and is relying on remote storage, which is much slower. This is a clear indicator that the query needs more resources or better optimization to ensure operations stay within the faster, local memory space.

Why this answer

High 'Remote Disk Spilling' and low partition pruning efficiency are classic indicators of poor performance. Spilling suggests that memory is insufficient for the data volume, while low pruning indicates that the query is forced to scan a large portion of the table, often due to missing clustering keys or inefficient filter predicates. Both issues are easily detectable via the Query Profile.

Exam trap

Candidates often look only at execution duration, ignoring core underlying hardware indicators like disk spilling and poor pruning efficiency.

2
MCQmedium

An architect notices a large table is frequently queried using a range filter on a timestamp column. The table is currently clustered by a high-cardinality ID column. What is the most efficient way to improve query performance?

A.Add a search optimization service index on the timestamp column.
B.Increase the warehouse size to handle the large table scan.
C.Define a clustering key on the timestamp column.
D.Convert the table to a temporary table to reduce metadata overhead.
AnswerC

Defining a clustering key on the timestamp column allows Snowflake to organize data into micro-partitions based on time ranges. This enables partition pruning, where the engine skips partitions that fall outside the query range. This significantly reduces data retrieval time and improves overall performance for time-series analytical workloads.

Why this answer

Clustering by a timestamp column significantly improves range query performance by physically organizing data according to the filter criteria. Snowflake's automatic clustering service then maintains this order as DML operations occur. This reduces micro-partition scanning during query execution, minimizing I/O overhead.

Proper clustering is essential for large datasets where full table scans lead to excessive resource consumption and longer wait times for end users.

Exam trap

Candidates often assume that changing the clustering key is a destructive or complex operation, or they suggest creating a secondary index, which does not exist in Snowflake.

3
MCQhard

An architect is investigating a performance regression in a query that previously ran quickly. The query involves a join between a large fact table and a small dimension table. The query profile shows a significant amount of time spent in the 'Join' operator, with many rows being processed. Which of the following is the most likely cause of the performance degradation?

A.The warehouse size was reduced, causing less memory for join operations.
B.Statistics on the fact table are stale, leading to a poor join order.
C.The small dimension table has grown significantly and is no longer suitable for a broadcast join.
D.The fact table has been clustered on a different column, causing poor pruning.
AnswerC

If the dimension table has grown, the optimizer may no longer choose a broadcast join, which is efficient for small tables. Instead, it might perform a hash join that requires shuffling the large fact table, leading to increased time in the Join operator. This is a common cause of performance regression in such scenarios.

Why this answer

When a small dimension table grows, it may exceed the threshold for a broadcast join, causing the optimizer to switch to a hash join that shuffles the large fact table. This increases data movement and join processing time. The other options would typically manifest in different operators or with additional symptoms like spills.

Exam trap

The trap here is assuming that join performance issues are always due to warehouse size or statistics, when a change in table size can alter the join strategy and cause shuffling.

4
MCQmedium

An organization has a 500TB table containing IoT sensor data. Users frequently run point-lookup queries filtering by a specific Sensor_ID, which has very high cardinality. The table is currently clustered by Event_Timestamp. Performance for these Sensor_ID lookups is poor. Which architectural change would provide the most cost-effective performance improvement for these specific queries?

A.Re-cluster the table using Sensor_ID as the primary clustering key.
B.Enable the Search Optimization Service for the Sensor_ID column.
C.Create a Materialized View that filters for the most active Sensor_IDs.
D.Increase the Virtual Warehouse size to 4X-Large to improve scanning speed.
AnswerB

Enabling the Search Optimization Service creates a persistent search access path that allows the query optimizer to bypass scanning irrelevant micro-partitions. This is specifically designed for high-cardinality columns and point lookups, providing significantly faster response times for filtered queries without the need to manually manage or re-sort the underlying table data.

Why this answer

The Search Optimization Service is a background process that speeds up point lookup queries by creating an optimized data structure. Unlike clustering, which reorders the actual data, this service tracks values across micro-partitions. It is ideal for high-cardinality columns and queries using equality predicates or specific functions like LIKE, where traditional pruning methods might scan too many partitions.

Exam trap

Candidates frequently recommend changing the clustering key for high-cardinality point lookups, failing to realize that clustering is ineffective for high-cardinality equality searches which instead require the Search Optimization Service.

5
Multi-Selecthard

Under which TWO scenarios should an architect choose to increase the warehouse size (Vertical Scaling) rather than increasing the maximum number of clusters (Horizontal Scaling)?

Select 2 answers
A.A single complex query is spilling significant amounts of data to remote storage.
B.The number of concurrent users has increased from 10 to 100.
C.A query involving multiple large table joins is taking too long to execute.
D.The organization wants to reduce the time it takes for a warehouse to auto-suspend.
E.The dashboard queries are small but are frequently queuing behind each other.
AnswersA, C

When a query spills to remote storage, it means the local memory and SSD on the current warehouse nodes are exhausted. Increasing the warehouse size provides more resources per node, allowing the query to keep more data in memory or local disk, which significantly improves performance compared to remote spilling.

Why this answer

Vertical scaling (larger warehouse) provides more memory and local storage per node, which is essential for complex queries that perform large joins or aggregations and might otherwise spill to disk. Horizontal scaling (multi-cluster) is specifically designed to handle high concurrency, where many different users are submitting queries at the same time.

Exam trap

Candidates often choose horizontal scaling assuming it solves all performance issues, confusing high user concurrency with single-query resource bottlenecks that actually require vertical scaling memory upgrades.

6
Multi-Selectmedium

An architect needs to optimize point-lookup queries on a VARIANT column that stores JSON data. Which TWO methods are most effective for improving performance for these types of queries?

Select 2 answers
A.Enable Search Optimization on the VARIANT column.
B.Flatten the entire JSON structure into a separate table every hour.
C.Create a Materialized View that extracts and casts the most-queried fields.
D.Use the FLATTEN function in every query to access the data.
E.Convert the JSON data into a large STRING column.
AnswersA, C

Snowflake supports Search Optimization for VARIANT columns. This allows the service to index the fields within the JSON structure, enabling fast point lookups for specific key-value pairs without requiring a full scan of the table or the manual extraction of fields into separate columns.

Why this answer

Optimizing semi-structured data involves either making the data look like structured data through views/clustering or using specialized services. Since point lookups are the target, the Search Optimization Service on VARIANT columns or extracting common fields into their own clustered columns are the most effective strategies for performance.

Exam trap

Candidates frequently suggest standard clustering keys on raw VARIANT columns without realizing Snowflake requires the Search Optimization Service or extracted columns for performance.

7
MCQmedium

An architect is trying to optimize a query that scans many small files. What is the most effective approach to improve performance?

A.Increase the warehouse size.
B.Use the SEARCH OPTIMIZATION service.
C.Consolidate the small files into larger files during the ingestion process.
D.Enable auto-clustering on the table.
AnswerC

Consolidating files ensures that each file is closer to the recommended size, which significantly reduces the metadata overhead for the query engine. This allows Snowflake to read data more efficiently, improving scan performance and reducing the time spent on overhead tasks instead of actual data processing.

Why this answer

Scanning many small files results in high metadata overhead and inefficient I/O. The most effective way to address this is to consolidate these small files into larger ones, which reduces the number of operations required and improves throughput. Snowflake's storage engine performs best when data is stored in optimally sized files, typically between 100MB and 250MB, minimizing the overhead of opening and reading many tiny files.

Exam trap

Candidates often incorrectly suggest increasing the warehouse size or using clustering keys to solve small file issues, failing to realize that metadata overhead must be resolved at the ingestion source level.

8
MCQhard

A data architect is designing a table that will store 10TB of semi-structured JSON data in a VARIANT column. Queries frequently filter on specific JSON attributes using dot notation, such as data:customer_id::string. The architect wants to minimize query latency and storage costs. Which approach should the architect take?

A.Use a materialized view that pre-aggregates the JSON data by customer_id.
B.Extract frequently queried JSON attributes into separate relational columns and cluster on those columns.
C.Enable the Search Optimization Service on the VARIANT column to accelerate point lookups.
D.Store the JSON data in an external table and query it directly with Snowflake.
AnswerB

Extracting frequently accessed JSON attributes into native columns allows Snowflake to store them in a columnar format, enabling efficient pruning and compression. Clustering on those columns further improves pruning for filtered queries. This approach reduces the amount of data scanned and can lower storage costs because native columns are more efficient than VARIANT. It is the recommended best practice for performance and cost.

Why this answer

Extracting frequently queried JSON attributes into native columns and clustering on them allows Snowflake to prune micro-partitions efficiently, reducing the amount of data scanned. This improves query latency and can reduce storage costs because native columns are more compact than VARIANT. Other options either add overhead or do not address the need for efficient filtering on specific attributes.

Exam trap

The trap here is assuming that enabling Search Optimization Service on a VARIANT column is always the best way to accelerate JSON queries, overlooking its cost and limited applicability.

9
MCQmedium

Which system function should an architect use to evaluate the clustering health of a table and determine if the current clustering key is effectively organizing the data into distinct micro-partitions?

A.SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS
B.SYSTEM$CLUSTERING_DEPTH
C.SYSTEM$CLUSTERING_INFORMATION
D.SYSTEM$QUERY_PROFILE_ANALYZER
AnswerC

This is the correct function for analyzing clustering health. It returns a JSON object containing the total partition count, average depth, and a histogram of overlapping partitions. This data is essential for an architect to decide whether to add, change, or remove a clustering key to improve query performance.

Why this answer

The SYSTEM$CLUSTERING_INFORMATION function provides detailed metrics about a table's clustering, including the average clustering depth and the overlap between micro-partitions. A high clustering depth indicates that the clustering key is not effective or that the table has become disorganized over time, requiring re-clustering or a new key.

Exam trap

Candidates frequently suggest querying the metadata tables (like TABLE_STORAGE_METRICS) instead of using the dedicated system function, which provides a more direct calculation of clustering depth and overlap.

10
MCQeasy

A user runs a query that takes 10 minutes to execute. They immediately run the exact same query again, but it still takes 10 minutes. Which of the following is a likely reason why the Result Cache was not utilized?

A.The query contains a non-deterministic function like CURRENT_DATE().
B.The warehouse used for the second query was a different size.
C.The table data was updated via a SELECT statement.
D.The user does not have the same role as the previous user.
AnswerA

Non-deterministic functions are evaluated every time a query is run. Because the value of functions like CURRENT_DATE() or CURRENT_TIMESTAMP() can change between executions, Snowflake cannot guarantee that the cached result is still valid. Therefore, it bypasses the Result Cache and re-executes the query to ensure data accuracy.

Why this answer

The Snowflake Result Cache stores the results of queries for 24 hours. However, for a query to use the Result Cache, it must be identical to the previous query and must not contain non-deterministic functions like CURRENT_TIMESTAMP() or UUID_STRING(), which are evaluated at execution time and prevent cache reuse.

Exam trap

Candidates often assume that any identical query will hit the Result Cache, forgetting that non-deterministic functions invalidate the cache regardless of the underlying data remaining unchanged.

11
MCQmedium

An architect is considering the Query Acceleration Service (QAS) for a specific workload. Which type of query is most likely to benefit from QAS?

A.Small, frequent point-lookups on a table with Search Optimization enabled.
B.A query that scans a large volume of data but filters it down significantly.
C.A query that is currently spilling data to remote storage during a sort.
D.A query that is entirely served from the Snowflake Result Cache.
AnswerB

QAS is ideal for queries that perform massive table scans or filters that are compute-intensive. By offloading these scans to the QAS shared compute resources, the query can complete much faster without requiring the user to permanently resize their warehouse to a larger, more expensive T-shirt size.

Why this answer

The Query Acceleration Service (QAS) acts like an 'adhoc' burst of compute for specific parts of a query, typically large scans or filters. It is most effective for 'outlier' queries that scan massive amounts of data but produce few rows, allowing the main warehouse to avoid being bogged down by a single massive scan.

Exam trap

Candidates often assume QAS improves all slow queries, whereas it specifically targets large-scale scans that would otherwise consume excessive resources on the primary warehouse.

12
MCQhard

An architect is tuning a query that joins a large fact table to a dimension table. The query profile shows that the join is a full outer join and that the fact table is scanned entirely, even though the query filters on a column from the dimension table. The dimension table is small. The architect wants to reduce the amount of data scanned without changing the result set. Which action is most likely to improve performance?

A.Increase the warehouse size to give the join more memory.
B.Materialize the dimension table as a temporary table before the join.
C.Rewrite the full outer join as an inner join if the business logic does not require unmatched rows.
D.Add a clustering key on the fact table's join column to improve pruning.
AnswerC

A full outer join prevents the optimizer from pushing down filters from the dimension table to the fact table, because it must preserve unmatched rows from both sides. If the business logic does not require unmatched rows, rewriting as an inner join allows the optimizer to push the dimension filter to the fact scan, drastically reducing data read and improving performance without changing the intended result set.

Why this answer

Full outer joins prevent the optimizer from pushing dimension filters down to the fact table, forcing a full scan. When unmatched rows are not needed, rewriting as an inner join allows predicate pushdown, so the fact table reads only matching rows. This reduces I/O and speeds up the query without altering the required result set.

Exam trap

The trap here is assuming that a larger warehouse or a clustering key will fix a scan caused by join semantics, when the real issue is that the full outer join blocks filter pushdown.

13
MCQeasy

Which property of External Tables should an architect configure to ensure that Snowflake does not scan all files in the underlying S3/Azure/GCS bucket for every query?

A.AUTO_REFRESH = TRUE
B.PARTITION BY
C.FILE_FORMAT = (TYPE = PARQUET)
D.INTEGRATION = 'MY_STORAGE_INT'
AnswerB

The PARTITION BY clause allows the architect to define a logical structure based on the file paths in the external stage. When a query filters on these partition columns, Snowflake can prune the file list and only scan the specific sub-folders that contain relevant data, mimicking the pruning behavior of internal tables.

Why this answer

Partitioning is the key to performance for External Tables. By defining partitions that match the folder structure in cloud storage, Snowflake can use the metadata to skip entire directories (files) that do not match the query's filter criteria, significantly reducing the I/O required for the query.

Exam trap

Candidates often confuse external table partitioning with automatic clustering, forgetting that external tables require explicit folder definitions to prune cloud storage files effectively.

14
MCQmedium

An architect is optimizing a query that joins a large fact table and a small dimension table. The query is slow. What should be the first step to improve performance?

A.Create a clustering key on the fact table.
B.Analyze the Query Profile to check for broadcast joins.
C.Increase the warehouse size to its maximum.
D.Convert the dimension table into a temporary table.
AnswerB

The Query Profile reveals how the join is being performed. A broadcast join sends the small dimension table to every node, which is optimal. If it is not being broadcast, the architect can investigate why the optimizer chose a different method and potentially adjust the query to force better behavior.

Why this answer

In star schema joins, Snowflake's optimizer typically handles small dimension tables by broadcasting them to all nodes, which is very efficient. However, if the query is still slow, checking the Query Profile to see if the join is actually being broadcast is essential. If the optimizer is not broadcasting the small table, the architect can use a hint or reorganize the join to ensure it happens.

Exam trap

Candidates often jump to rewriting the SQL query or changing the table structure before checking the actual execution plan, which is the most efficient way to diagnose join behavior.

15
MCQhard

An architect is analyzing a Snowflake query that performs poorly. The Query Profile shows a high percentage of time spent in the 'TableScan' operator with a large number of partitions scanned, despite a filter on a column with high selectivity. The table is not clustered. Which action is most likely to improve performance?

A.Enable the Query Acceleration Service on the warehouse.
B.Add a clustering key on the filtered column.
C.Create a materialized view on the filtered column.
D.Increase the warehouse size to add more compute nodes.
AnswerB

Clustering on the filtered column will co-locate similar values in the same micro-partitions, enabling Snowflake to prune partitions that do not match the filter. This reduces the number of partitions scanned, directly addressing the high TableScan time. It is the most targeted fix for this scenario.

Why this answer

The query scans many partitions because the table is not clustered, even though the filter is selective. Adding a clustering key on the filtered column reorganizes data so that only relevant micro-partitions are read. This reduces I/O and TableScan time.

Other options may provide some benefit but do not directly solve the partition pruning issue.

Exam trap

The trap here is thinking that increasing warehouse size or enabling Query Acceleration Service will always fix slow scans, but they do not address the root cause of scanning unnecessary partitions.

16
MCQeasy

A Snowflake architect is tasked with improving the performance of a dashboard that runs several queries against a large fact table. The queries filter on different columns and are run concurrently by many users. The architect notices that the warehouse is often queued due to high concurrency. Which configuration change is most appropriate to reduce queuing and improve concurrency?

A.Enable the Query Acceleration Service on the warehouse.
B.Enable multi-cluster warehouse with a minimum and maximum cluster count greater than 1.
C.Increase the warehouse size to a larger T-shirt size.
D.Set the warehouse to auto-suspend after 60 seconds of inactivity.
AnswerB

Multi-cluster warehouses automatically add or remove clusters based on concurrency and queueing. Setting minimum and maximum clusters greater than 1 allows the warehouse to scale out to handle concurrent queries, reducing queuing. This directly addresses the high concurrency issue described.

Why this answer

High concurrency causing queuing is best resolved by scaling out with a multi-cluster warehouse. By configuring minimum and maximum clusters greater than 1, Snowflake can automatically add clusters when queries are queued, allowing more concurrent queries to run. Scaling up or enabling other features does not increase concurrency capacity.

Exam trap

The trap here is confusing scaling up (larger warehouse size) with scaling out (multi-cluster), where only scaling out increases concurrent query capacity.

17
MCQeasy

Which Snowflake feature should be used to improve performance for point lookups on tables with billions of rows?

A.Automatic Clustering.
B.Search Optimization Service.
C.Materialized Views.
D.Result Caching.
AnswerB

The Search Optimization Service provides an indexed access path that enables extremely fast performance for point lookups. By maintaining specialized metadata, it allows the query processor to jump directly to the specific micro-partitions containing the requested data, bypassing the need for scanning the vast majority of the table storage.

Why this answer

The Search Optimization Service is designed specifically for point lookups where you need to find specific rows based on equality or inequality predicates. It creates persistent data structures that allow the engine to find relevant data without scanning the entire table. This significantly reduces latency for frequent, highly selective queries on massive datasets that would otherwise be impractical to scan.

Exam trap

Candidates frequently suggest clustering as the primary solution for point lookups, overlooking that the Search Optimization Service is specifically purpose-built for high-performance retrieval of individual rows.

18
MCQeasy

A data engineer is building a dashboard that queries a large sales table with filters on region and date. The table is not clustered, and queries scan many micro-partitions. The engineer wants to improve query performance with minimal ongoing maintenance. Which Snowflake feature should the engineer use?

A.A materialized view that pre-aggregates sales by region and date.
B.Search Optimization Service on the region column.
C.A clustering key on the region and date columns.
D.Increasing the warehouse size to scan the table faster.
AnswerC

Clustering on region and date aligns the physical layout of the table with the dashboard's filter columns, allowing Snowflake to prune micro-partitions effectively. This reduces the amount of data scanned and improves query performance. Clustering is maintained automatically by Snowflake, so ongoing maintenance is minimal, making it a good fit for this scenario.

Why this answer

Clustering on the columns used in the dashboard filters (region and date) enables Snowflake to prune micro-partitions, reducing the data scanned. Snowflake automatically maintains clustering, so ongoing effort is minimal. This directly addresses the performance issue of scanning many micro-partitions and is the recommended approach for large tables with recurring filter patterns.

Exam trap

The trap here is choosing Search Optimization Service for range and broad filters, when it is intended for highly selective point lookups, not for general dashboard filtering.

19
MCQmedium

An architect is optimizing a Snowflake environment where a critical query joins a large fact table with a small dimension table. The Query Profile shows that the build side of the hash join is spilling to local disk. Which action is most likely to eliminate the spilling and improve performance?

A.Rewrite the query to use a nested loop join instead of a hash join.
B.Enable the Query Acceleration Service on the warehouse.
C.Increase the warehouse size to provide more memory per node.
D.Add a clustering key on the join column of the large fact table.
AnswerC

Hash join spilling occurs when the build side (often the smaller table) does not fit in memory. Increasing the warehouse size adds more memory per node, allowing the build side to fit in memory and eliminating spilling. This directly addresses the issue shown in the Query Profile.

Why this answer

Spilling to local disk in a hash join indicates that the build side does not fit in the available memory. Increasing the warehouse size provides more memory per node, allowing the build side to be held in memory. This eliminates spilling and improves join performance.

Other options do not address the memory constraint.

Exam trap

The trap here is assuming that clustering or Query Acceleration Service will fix spilling, but spilling is a memory issue that is best resolved by scaling up the warehouse.

20
MCQhard

A Snowflake architect is investigating a query that performs poorly due to a large hash join. The query joins a 5TB fact table with a 10GB dimension table. The fact table is not clustered. The query filters the fact table on a date range that covers 10% of the data. Which optimization is most likely to improve performance with minimal cost?

A.Add a clustering key on the date column of the fact table.
B.Increase the warehouse size to provide more memory for the hash join.
C.Create a materialized view that pre-joins the fact and dimension tables.
D.Enable the Search Optimization Service on the fact table's date column.
AnswerA

Clustering on the date column allows Snowflake to prune micro-partitions that fall outside the filtered date range, reducing the data scanned by the join. Since the query filters on date and only 10% of data is relevant, clustering can significantly reduce I/O and improve performance. It is a targeted and cost-effective optimization for this scenario.

Why this answer

Clustering the fact table on the date column enables micro-partition pruning for the date range filter, reducing the data scanned by the join. This directly addresses the performance bottleneck without the overhead of larger warehouses or materialized views. It is the most cost-effective optimization for this scenario.

Exam trap

The trap here is assuming that increasing warehouse size will solve the performance issue, when the real problem is the amount of data being scanned due to lack of pruning.

21
MCQmedium

While reviewing a Query Profile, an architect notices that a 'Join' operator is consuming 90% of the total execution time, and one specific node in the warehouse is processing significantly more rows than others. What is the most likely cause and the best resolution?

A.The warehouse size is too small; increase it to a larger T-shirt size.
B.The query is experiencing data skew; investigate the join key distribution.
C.The Result Cache is cold; run the query again to populate the cache.
D.The table is not clustered; apply a clustering key to the join column.
AnswerB

The symptom of one node processing significantly more rows than others is a classic indicator of data skew. The architect should analyze the distribution of values in the join column. If a single value (like NULL or a default ID) appears in millions of rows, it will concentrate processing on a single node.

Why this answer

Data skew occurs when the data is not evenly distributed across the join key. This causes one node in the warehouse to perform the majority of the work while others remain idle. To resolve this, the architect should consider using a different join key or applying a 'skew hint' if supported, or pre-aggregating the skewed data.

Exam trap

Candidates often blame the warehouse size for slow joins, overlooking the symptom of uneven row processing which is a classic indicator of data skew rather than insufficient compute.

22
MCQmedium

A Snowflake architect notices that a recurring ETL job that loads data into a table and then immediately runs a complex aggregation query is taking longer than expected. The table is not clustered, and the query filters on a timestamp column. Which action would most directly improve the performance of the aggregation query?

A.Adding a clustering key on the timestamp column
B.Increasing the warehouse size
C.Using a multi-cluster warehouse
D.Enabling the Search Optimization Service on the table
AnswerA

Clustering the table on the timestamp column physically orders the data by that column, allowing the query to prune micro-partitions based on the timestamp filter. This reduces the amount of data scanned, directly improving the performance of the aggregation query that filters on that column.

Why this answer

Clustering the table on the timestamp column enables partition pruning, so the query only scans micro-partitions that contain the relevant time range. This directly reduces I/O and improves aggregation performance. Search Optimization is for point lookups, larger warehouses add compute but not pruning, and multi-cluster addresses concurrency.

Exam trap

The trap here is assuming that increasing warehouse size always solves performance issues, when in fact reducing data scanned through clustering can be more effective for filtered aggregations.

23
MCQmedium

A financial services company uses Snowflake to analyze trade data. They have a large table TRANSACTIONS with a clustering key on TRADE_DATE. Queries that filter on TRADE_DATE and ACCOUNT_ID are performing well, but queries that filter only on ACCOUNT_ID are slow. The architect wants to improve performance for ACCOUNT_ID-only queries without degrading the performance of TRADE_DATE queries. Which solution is most appropriate?

A.Create a search optimization service on the ACCOUNT_ID column.
B.Add a secondary clustering key on ACCOUNT_ID.
C.Add a materialized view that filters on ACCOUNT_ID and pre-aggregates the data.
D.Change the clustering key to (ACCOUNT_ID, TRADE_DATE).
AnswerA

Search Optimization Service (SOS) is designed to accelerate point lookups and selective queries on columns that are not the clustering key. By enabling SOS on ACCOUNT_ID, queries filtering on that column can benefit from an optimized search access path, without affecting the existing clustering on TRADE_DATE. This maintains performance for TRADE_DATE queries while improving ACCOUNT_ID queries.

Why this answer

Search Optimization Service is the ideal solution for accelerating selective queries on columns that are not part of the clustering key. It creates a persistent search access path that allows Snowflake to quickly locate micro-partitions containing the desired values. This improves ACCOUNT_ID-only queries without altering the existing clustering on TRADE_DATE, thus preserving performance for TRADE_DATE queries.

Exam trap

The trap here is assuming that you can have multiple clustering keys or that changing the clustering key is the only way to improve performance on a non-clustered column.

24
MCQmedium

Which action should an architect take to optimize a query that is experiencing significant 'Remote Disk Spilling' during a join operation on large datasets?

A.Enable multi-cluster warehouse auto-scaling.
B.Increase the warehouse size.
C.Change the table join order in the SQL statement.
D.Remove the query from the warehouse and use a serverless task.
AnswerB

Increasing the warehouse size doubles the compute and memory resources per node. This extra memory capacity allows the query processing engine to perform operations like hash joins entirely in memory, eliminating the performance penalty of writing temporary data to remote storage, which is the primary cause of slow performance.

Why this answer

Remote disk spilling occurs when the active memory of a warehouse node is insufficient to hold the working set of data for an operation like a join or aggregation. By increasing the warehouse size, you provide more memory per node, allowing the query to complete in-memory. This prevents the high-latency I/O operations associated with spilling to remote cloud storage, thereby drastically reducing query execution time.

Exam trap

Candidates often mistakenly select query acceleration service or altering clustering keys to fix remote disk spilling, missing that only scaling up the warehouse size increases the per-node memory required to resolve the issue.

25
MCQhard

When would using a Search Optimization Service be inappropriate for a table?

A.When the table is frequently queried by ID.
B.When the table is extremely large.
C.When the table experiences extremely high DML volume.
D.When the query filter uses equality predicates.
AnswerC

The Search Optimization Service continuously updates its index as data changes. On tables with constant, high-frequency DML (inserts, updates, deletes), the cost and overhead of maintaining the index become prohibitive. The performance impact on the DML operations makes this an inappropriate choice for highly transactional, volatile datasets.

Why this answer

The Search Optimization Service is not designed for every workload. It is specifically aimed at point-lookups on large tables. It is inappropriate for tables that are very small, where standard scanning is already extremely fast, or for tables that undergo extremely high-frequency DML updates, as the maintenance cost of the search index would become a performance bottleneck.

Exam trap

Candidates often assume the Search Optimization Service is a universal performance boost. They fail to consider the high overhead costs associated with maintaining indexes during frequent DML operations.

26
MCQmedium

A financial services company runs a Snowflake workload where several long-running analytical queries compete with a high volume of short interactive dashboard queries on the same multi-cluster warehouse. Users report that dashboards sometimes wait behind heavy reports. The architect wants a cost-effective configuration that isolates the heavy reports from the interactive queries without duplicating compute unnecessarily. What should the architect do?

A.Increase the warehouse size to the next larger size so that all queries get more compute resources.
B.Create a separate warehouse for the heavy reports and route those queries to it, leaving the dashboard warehouse for interactive queries.
C.Enable the Query Acceleration Service on the existing warehouse to offload portions of the heavy queries.
D.Set the STATEMENT_TIMEOUT_IN_SECONDS parameter to a low value on the warehouse so long queries are cancelled.
AnswerB

Using separate warehouses for the heavy reports and the interactive dashboards isolates the two workloads so they no longer compete for the same compute resources. The dashboard queries run on their own warehouse without waiting behind long reports, and each warehouse can be sized and scaled independently, which is the recommended way to handle mixed workloads cost-effectively.

Why this answer

Separate warehouses are the standard way to isolate workloads in Snowflake. By giving heavy reports their own warehouse, the interactive dashboards no longer queue behind them, and each workload can be sized and scaled independently. This avoids over-provisioning a single warehouse and keeps credit usage aligned with each workload's needs.

Exam trap

The trap here is assuming that scaling up a single warehouse or enabling acceleration features will isolate workloads, when only separate warehouses truly prevent one workload from blocking another.

27
MCQeasy

A Snowflake architect is investigating a slow-running query that joins a large fact table with a small dimension table. The query profile shows that the join operation is using a Cartesian product, resulting in a massive number of rows processed. The architect checks the query and notices that the join condition is missing. Which action should the architect take to resolve the performance issue?

A.Enable the Query Acceleration Service to automatically optimize the join.
B.Rewrite the query to include an appropriate join condition between the fact and dimension tables.
C.Add a WHERE clause to filter the result set after the join.
D.Increase the size of the virtual warehouse to handle the larger result set.
AnswerB

A Cartesian product occurs when a join lacks a proper join condition, causing every row from one table to be paired with every row from the other. Adding the correct join condition (e.g., matching foreign key to primary key) eliminates the Cartesian product and allows Snowflake to perform an efficient hash join or similar operation, drastically reducing the number of rows processed.

Why this answer

A Cartesian product in a join is typically caused by a missing or incorrect join condition. The most effective fix is to rewrite the query to include the proper join predicate, which enables Snowflake to execute an efficient join algorithm. Other measures like adding filters or increasing warehouse size do not address the core problem.

Exam trap

The trap here is thinking that adding a filter or scaling up the warehouse can mitigate a Cartesian join, when the only real solution is to correct the join condition.

28
MCQmedium

A retailer has a 50TB table containing transaction logs. Users frequently query specific transaction_id values (highly selective point lookups) but also run daily reports aggregated by transaction_date. The table is currently clustered by transaction_date. What is the most cost-effective way to improve point lookup performance without degrading report performance?

A.Re-cluster the table by transaction_id and transaction_date.
B.Increase the Virtual Warehouse size to X-Large.
C.Enable the Search Optimization Service on the transaction_id column.
D.Create a Materialized View on transaction_id.
AnswerC

Search Optimization is specifically designed for highly selective queries on non-clustered columns. By adding this service to the transaction ID, Snowflake builds an access path that skips irrelevant micro-partitions. This approach preserves the existing date-based clustering, ensuring that both point lookups and daily aggregate reports remain highly performant.

Why this answer

Point lookups on high-cardinality columns like IDs benefit significantly from the Search Optimization Service because it creates a persistent data structure to locate specific rows without scanning entire micro-partitions. Unlike re-clustering, SOS does not change the physical layout of the data, allowing the existing clustering on date to remain optimal for range-based analytical reporting while drastically reducing latency for needle-in-a-haystack queries.

Exam trap

Candidates often try to re-cluster the table by the lookup column, which ruins the existing date-based reporting performance and wastes compute credits.

29
MCQmedium

When a query is slow, which Snowflake feature provides the most granular details about the time spent in every operator (e.g., Join, Filter, Aggregate)?

A.Snowflake Query History.
B.The Query Profile tool.
C.The SHOW METRICS command.
D.The EXPLAIN command.
AnswerB

The Query Profile is designed to show the performance of every individual operator within a query. It includes details on data volume, memory usage, spill counts, and time taken. This granularity is essential for pinpointing the exact cause of a query's slowness, whether it is a join, a scan, or an aggregation.

Why this answer

The Query Profile is the single most important diagnostic tool for performance tuning in Snowflake. It provides a hierarchical view of the query execution plan, showing exactly how much time was spent in each operator. By analyzing the time spent in joins, filters, or aggregations, an architect can identify the exact source of performance bottlenecks, such as spilling or scan inefficiencies, for rapid remediation.

Exam trap

Candidates often look at the Query History or Account Usage views to diagnose a slow query, missing that these only provide high-level metrics without the operator-level detail.

30
MCQmedium

An architect is designing a dashboard that runs a query joining a 5 TB fact table to a small 2 GB dimension table. The fact table is not clustered, and the dimension table is updated hourly. The query filters on a high-cardinality column in the fact table and joins on a low-cardinality key. The architect wants to minimize query latency without increasing warehouse size. Which approach is most effective?

A.Add a clustering key on the fact table's high-cardinality filter column.
B.Enable the Search Optimization Service on the fact table.
C.Materialize the join as a new table and refresh it hourly.
D.Increase the warehouse size to add more compute nodes.
AnswerA

Clustering the fact table on the high-cardinality filter column improves partition pruning, so the query reads fewer micro-partitions. This reduces I/O and speeds up the join without resizing the warehouse. Since the dimension is small, it can be broadcast or cached, so the main bottleneck is scanning the large fact table. Clustering directly addresses that bottleneck.

Why this answer

The query's main cost is scanning the large fact table. Clustering on the high-cardinality filter column enables partition pruning, reducing I/O. The small dimension table does not warrant special handling.

Search Optimization is for point lookups, materializing adds overhead, and resizing does not address the root cause of excessive data scanning.

Exam trap

The trap here is assuming that Search Optimization Service can replace clustering for all selective queries, when it is actually optimized for point lookups and may not help with range scans or joins.

31
MCQmedium

A Snowflake architect is reviewing a query that uses a window function partitioned by customer_id and ordered by transaction_date. The query processes a 1TB table and runs slowly. The architect notices that the table is not clustered. Which action should the architect take to improve performance?

A.Increase the warehouse size to provide more compute for the window function.
B.Use the Search Optimization Service on the customer_id column.
C.Cluster the table on customer_id and transaction_date.
D.Create a materialized view that pre-computes the window function.
AnswerC

Clustering on the partition and order columns of the window function allows Snowflake to co-locate related rows, reducing data shuffling and improving the efficiency of the window computation. This can significantly speed up the query by minimizing the amount of data that must be sorted and processed within each partition.

Why this answer

Clustering on the columns used in the window function's PARTITION BY and ORDER BY clauses co-locates related data, reducing shuffling and sorting during query execution. This directly improves the performance of window functions on large tables. Other options either do not address data organization or are not applicable.

Exam trap

The trap here is assuming that increasing warehouse size will always improve window function performance, when data clustering is often more impactful for large-scale sorts and partitions.

32
MCQhard

A Snowflake architect is analyzing a query that performs a large aggregation over a fact table with billions of rows. The query profile shows that the aggregation step is spilling to local disk, and the warehouse is a 2XL multi-cluster warehouse with 4 clusters. The architect wants to reduce the spilling and improve performance. Which action is most likely to achieve this?

A.Increase the number of clusters in the multi-cluster warehouse to 8.
B.Reduce the size of the warehouse to a smaller size to decrease spilling.
C.Scale up the warehouse to a larger size to provide more memory per node.
D.Enable the Query Acceleration Service to offload the aggregation.
AnswerC

Scaling up the warehouse increases the compute and memory resources per node. A larger warehouse, such as a 3XL or 4XL, provides more memory for each node to hold intermediate aggregation results, reducing the need to spill to disk. This directly addresses the spilling issue and can significantly improve query performance.

Why this answer

Spilling to local disk during aggregation indicates that the query's working set exceeds the available memory per node. Scaling up the warehouse increases memory per node, allowing the aggregation to be processed in memory and reducing spilling. Adding clusters or enabling QAS does not address the per-query memory limitation.

Exam trap

The trap here is confusing concurrency scaling (adding clusters) with scaling up for per-query performance, and assuming QAS can fix any performance issue.

33
Multi-Selectmedium

A Snowflake architect is optimizing a slow query that performs a large aggregation over a fact table. The query profile shows that the Aggregation operator is taking a long time. Which TWO actions are most likely to improve the performance of this aggregation? (Choose two.)

Select 2 answers
A.Use a materialized view that pre-aggregates the data.
B.Rewrite the query to use a window function instead of GROUP BY.
C.Increase the size of the virtual warehouse to add more compute resources.
D.Add a clustering key on the columns used in the GROUP BY clause.
E.Enable the Search Optimization Service on the fact table.
AnswersA, D

A materialized view that pre-aggregates the data can eliminate the need to compute the aggregation at query time, especially if the query matches the view's definition. This can dramatically reduce query latency. However, it requires storage and maintenance, and is only effective if the query patterns are repetitive and align with the view's aggregation.

Why this answer

Clustering on the GROUP BY columns improves data locality, reducing shuffle during aggregation, while a materialized view that pre-aggregates can avoid computing the aggregation altogether for matching queries. Both directly target the aggregation bottleneck. Scaling up or enabling Search Optimization Service do not address the core issue of data organization for aggregation.

Exam trap

The trap here is assuming that any performance feature like Search Optimization Service or simply scaling up will fix aggregation slowness, when the key is to optimize how data is grouped and pre-aggregated.

34
MCQeasy

A data architect notices that a recurring batch job that loads data into a Snowflake table and then runs a series of transformation queries is taking longer than expected. The transformation queries involve multiple joins and aggregations. The architect wants to ensure that the warehouse is adequately sized for the workload without over-provisioning. Which Snowflake feature should the architect use to analyze the performance of individual queries and identify bottlenecks?

A.Warehouse load monitoring in the Snowflake web interface.
B.Snowflake's automatic clustering recommendations.
C.Query Profile in the Snowflake web interface.
D.ACCOUNT_USAGE.QUERY_HISTORY view.
AnswerC

Query Profile provides a graphical representation of the query execution plan, showing operators, time spent, rows processed, and spilling. It is the primary tool for diagnosing performance issues at the query level. The architect can use it to identify which parts of the transformation queries are slow, such as joins or aggregations, and then decide on warehouse sizing or query tuning.

Why this answer

Query Profile is the dedicated tool for examining query execution plans and operator-level metrics. It helps identify bottlenecks like expensive joins or aggregations. Other options provide either high-level metadata or capacity information, but not the granular execution details needed for tuning individual queries.

Exam trap

The trap here is confusing monitoring tools like QUERY_HISTORY with diagnostic tools like Query Profile; the former gives metadata, while the latter gives execution details.

35
MCQhard

Refer to the exhibit. What is the most likely performance issue here?

A.The warehouse is too small for the amount of data.
B.The table is not effectively clustered by the date column.
C.The result cache is disabled.
D.The query is missing a search optimization index.
AnswerB

When a query filters by a specific range and scans all partitions, it is a clear sign that the physical data layout does not support the query filter. By clustering the table by the date column, the engine can identify and skip partitions that fall outside the specified date range.

Why this answer

The exhibit shows that the query scanned all 1,000 partitions despite applying a filter on a date range. This indicates that the data is not physically organized by the date column, preventing the engine from performing partition pruning. Because no partitions could be skipped, the engine was forced to scan every single micro-partition, leading to long execution times regardless of the filter's narrow range.

Exam trap

Candidates often assume that because a filter is present, the query should be fast, ignoring that the physical layout of the data must support that filter via pruning.

36
MCQmedium

A SnowPro Advanced Architect is designing a new fact table that will be loaded incrementally each day with 500 million rows. The table will be queried primarily by a small set of high-concurrency BI dashboards filtering on order_date and product_category. The architect wants to minimize micro-partition scanning for these queries. Which table design approach should the architect choose?

A.Define a clustering key on (order_date, product_category) to co-locate related rows in the same micro-partitions.
B.Create a materialized view that pre-aggregates the fact table by order_date and product_category.
C.Partition the table manually by order_date using separate tables per month and a UNION ALL view.
D.Enable the Search Optimization Service on the fact table to speed up point lookups on order_date and product_category.
AnswerA

A clustering key on the most frequently filtered columns, order_date and product_category, co-locates rows with similar values into the same micro-partitions. This reduces the number of micro-partitions scanned by dashboard queries that filter on these columns, improving pruning and lowering latency. Because the table is loaded incrementally, Snowflake's automatic clustering will maintain the clustering as new data arrives, keeping the layout efficient over time.

Why this answer

The scenario calls for reducing micro-partition scanning for range and equality filters on order_date and product_category. A clustering key on those columns aligns rows with similar values into the same micro-partitions, so the optimizer can prune more effectively. Automatic clustering maintains the layout as new data is inserted, which is critical for an incrementally loaded fact table.

Other options either do not improve pruning or add unnecessary complexity and cost.

Exam trap

The trap here is assuming that any performance feature, such as Search Optimization or a materialized view, will improve pruning for broad analytical filters, when clustering is the feature specifically designed for that access pattern.

37
MCQhard

A Snowflake architect is analyzing a slow-running query that joins two large tables and aggregates results. The query profile shows a significant amount of time spent in the 'Join' operator and a large number of rows spilled to local storage. The join condition uses a non-equality predicate (e.g., range join). Which optimization technique is most likely to improve performance?

A.Rewrite the query to use an equality join by adding a derived join key.
B.Enable the Query Acceleration Service on the warehouse.
C.Add a clustering key on the join columns of both tables.
D.Increase the warehouse size to add more memory per node.
AnswerA

Range joins can be inefficient because they cannot use hash joins and often result in nested loops or sort-merge joins with high spilling. By adding a derived equality key (e.g., bucketing or rounding), the query can use a hash join, which is more efficient and reduces data shuffling and spilling. This directly addresses the bottleneck shown in the query profile.

Why this answer

The query profile indicates a costly range join with spilling. Converting to an equality join via a derived key allows Snowflake to use a hash join, which is more scalable and reduces memory pressure. Other options either do not change the join algorithm or are less targeted for this specific bottleneck.

Exam trap

The trap here is assuming that scaling up the warehouse will always fix spilling, but spilling can be caused by inefficient join algorithms that persist regardless of memory size.

38
MCQhard

A Snowflake architect is investigating a query that performs poorly due to a Cartesian join between two large tables. The query is intended to join on a specific key, but the join condition is missing in the SQL. After correcting the query to include the join condition, the architect wants to ensure optimal performance. Which of the following is the most effective next step?

A.Add a clustering key on the join key in both tables.
B.Increase the warehouse size to handle the larger intermediate result set.
C.Rewrite the query to use a CROSS JOIN with a WHERE clause.
D.Verify that the join key columns in both tables have the same data type and are not implicitly cast.
AnswerD

Implicit casting of join keys can prevent efficient join methods and lead to full table scans. Ensuring both columns have identical data types allows Snowflake to use hash joins or other optimized join strategies. This is a critical step after fixing the join condition to avoid performance degradation due to type mismatches.

Why this answer

After correcting the missing join condition, the most effective next step is to ensure that the join keys have matching data types and are not subject to implicit casting. Implicit casts can prevent hash joins and cause full scans, severely impacting performance. Addressing this ensures the optimizer can choose an efficient join method before considering other optimizations like clustering.

Exam trap

The trap here is assuming that simply adding a clustering key or scaling up will solve join performance, when the root cause could be implicit type casting that prevents efficient join algorithms.

39
MCQmedium

When analyzing a query profile, you observe a high 'Remote Disk Spilling' metric. What is the most likely cause, and how can it be resolved?

A.The query is not using the Result Cache; enable the Result Cache.
B.Data is not clustered properly; re-cluster the table.
C.Insufficient memory for operations; increase warehouse size.
D.Network latency is high; change the cloud provider region.
AnswerC

Increasing the warehouse size provides more RAM per node, which directly reduces the likelihood of spilling intermediate datasets to disk. When a query is complex, scaling up is the most effective way to provide the memory headroom required for operations like large-scale joins and window functions.

Why this answer

Remote disk spilling happens when intermediate result sets exceed the local disk space of the compute nodes, forcing data to be written to remote storage (S3/Azure Blob). This significantly impacts latency. The resolution is to either increase the warehouse size to provide more local memory/disk space or optimize the query logic—specifically joining, sorting, or grouping operations—to reduce the amount of data being processed in memory.

Exam trap

Candidates frequently mistake remote disk spilling for cloud storage latency, failing to recognize it as a compute node memory exhaustion problem.

40
MCQmedium

An architect is designing a table to support analytical queries. Which data type choice would most likely improve performance for filtering operations?

A.Storing all numeric values as VARCHAR.
B.Using the smallest appropriate data type.
C.Storing dates as integers in a single column.
D.Using VARIANT for all columns.
AnswerB

Smaller, native data types require less space, which means fewer micro-partitions to read. This reduces I/O and speeds up query execution. By choosing the most efficient type, you maximize the amount of data that can be processed per unit of compute, directly enhancing performance for filtering and scan operations.

Why this answer

Using specific, numeric, or date/time types is significantly more efficient than storing data as strings (VARCHAR). Snowflake can perform range pruning and min/max tracking much better on structured types. Converting to the most restrictive data type possible reduces storage size and improves the speed at which the query engine can filter and scan data during execution.

Exam trap

Candidates often default to generic VARCHAR data types for simplicity, missing the performance and pruning penalties imposed on analytical filters.

41
Multi-Selecthard

An architect is investigating query performance issues where queries are spilling to local disk. Which TWO actions would most effectively mitigate this issue?

Select 2 answers
A.Resize the virtual warehouse to a larger size.
B.Increase the warehouse multi-cluster scale factor.
C.Optimize the query to reduce the volume of data shuffled.
D.Enable query result cache.
E.Convert the table to a temporary table.
AnswersA, C

Scaling up a warehouse increases the amount of memory available for operations on each compute node. This directly accommodates larger intermediate datasets that would otherwise be forced to spill to local SSDs during complex join or sort operations, thereby significantly improving query performance for memory-intensive workloads.

Why this answer

Spilling to disk occurs when the data required for an operation (like a Join or Sort) exceeds the memory available in the warehouse's compute nodes. By scaling up the warehouse, you increase the memory capacity per node. Alternatively, optimizing the query logic to reduce the volume of data being shuffled or sorted ensures that intermediate result sets fit within the available memory heap of the virtual warehouse.

Exam trap

Candidates often think increasing the maximum concurrency clusters will solve memory spilling issues, confusing horizontal scalability with node memory capacity.

42
MCQeasy

A Snowflake architect is reviewing a query that scans a large table and applies a highly selective filter on a column that is not the clustering key. The query profile shows a TableScan operator with a high percentage of partitions scanned but few rows returned. Which feature should the architect recommend to improve performance for this type of query?

A.Query Acceleration Service
B.Search Optimization Service
C.Clustering key on the filtered column
D.Materialized view on the filtered column
AnswerB

Search Optimization Service is designed to accelerate queries with highly selective filters, such as point lookups and substring searches, on columns that are not the clustering key. It builds a persistent search access path that allows Snowflake to quickly locate micro-partitions containing the desired values, reducing the number of partitions scanned. This directly addresses the symptom of scanning many partitions but returning few rows.

Why this answer

Search Optimization Service is purpose-built for queries that apply highly selective filters on columns that are not the clustering key. It creates a search access path that enables efficient micro-partition pruning, reducing the number of partitions scanned. While clustering can also improve pruning, it is more suitable for range filters and columns used in multiple queries.

QAS and materialized views target different workloads.

Exam trap

The trap here is assuming that any pruning improvement requires a clustering key, when Search Optimization Service is specifically designed for selective point lookups and substring searches.

43
MCQmedium

A data architect is tuning a Snowflake virtual warehouse that runs a mix of short ad-hoc queries and long-running analytical queries. The warehouse is sized as Medium, and the architect observes that short queries are frequently queued behind long queries. The architect wants to reduce queuing for short queries without increasing the warehouse size. Which configuration change should the architect make?

A.Create a separate warehouse for short ad-hoc queries and route them accordingly.
B.Enable the Query Acceleration Service on the warehouse.
C.Configure the warehouse with a multi-cluster scaling policy set to Standard.
D.Set the warehouse to auto-suspend after 60 seconds and auto-resume when queued.
AnswerA

Separating short ad-hoc queries onto a dedicated warehouse isolates them from long-running analytical queries, preventing queuing behind long queries. This approach allows each warehouse to be sized and scaled independently, optimizing for the specific workload. It is a common best practice for workload isolation and improves concurrency without increasing the size of the original warehouse.

Why this answer

Workload isolation by creating a separate warehouse for short ad-hoc queries prevents them from queuing behind long analytical queries. This allows independent sizing and scaling, improving performance for both workloads without increasing the size of the original warehouse. It is a standard Snowflake best practice for managing mixed workloads and reducing contention.

Exam trap

The trap here is thinking that multi-cluster warehouses solve all concurrency issues, but they add clusters for overall load and do not prioritize short queries over long ones.

44
Multi-Selecthard

Which THREE factors should be considered when evaluating the cost-benefit of enabling the Search Optimization Service on a large table? (Choose three.)

Select 3 answers
A.The frequency and selectivity of point lookup queries.
B.The rate of DML operations on the table.
C.The total number of rows in the table.
D.The storage costs associated with the search optimization indices.
E.The number of concurrent users accessing the warehouse.
AnswersA, B, D

Search optimization is most effective when queries are frequent and highly selective, returning only a small number of rows. If queries are infrequent or scan a large portion of the table, the cost of the service will likely outweigh the performance benefits provided by the indexed lookup structure.

Why this answer

The Search Optimization Service is a powerful tool, but it carries costs related to storage and maintenance. Enabling it for columns with very low selectivity (e.g., boolean flags) provides little benefit while incurring continuous costs. Architects must balance the gain in query performance for point lookups against the DML overhead and the additional storage required to maintain the index structures.

Exam trap

Candidates often assume the Search Optimization Service is 'free' or always beneficial, forgetting that it incurs both storage costs and performance overhead during frequent DML operations.

45
MCQmedium

An architect is optimizing a Snowflake environment where several large tables are frequently queried with filters on a timestamp column that is not the natural sort order of the data. The architect wants to improve query performance by reducing the amount of data scanned. Which action should the architect take?

A.Enable the Search Optimization Service on the timestamp column.
B.Define a clustering key on the timestamp column.
C.Increase the size of the virtual warehouse used for these queries.
D.Create a materialized view that filters on the timestamp column.
AnswerB

Clustering the table on the timestamp column reorganizes the data into micro-partitions that are sorted by that column. This enables partition pruning, so queries with filters on the timestamp column can skip micro-partitions that do not contain relevant time ranges. This reduces I/O and improves performance for a wide range of queries, not just those matching a specific view.

Why this answer

Clustering on the timestamp column sorts data into micro-partitions by that column, enabling partition pruning for range filters. This reduces I/O for many queries. Materialized views are query-specific, Search Optimization is for point lookups, and resizing does not reduce data scanned.

Exam trap

The trap here is assuming that Search Optimization Service can accelerate range filters on timestamps, but it is primarily for equality-based point lookups.

46
MCQmedium

What is the primary benefit of using Materialized Views in Snowflake for performance optimization?

A.They provide real-time updates for all data types.
B.They reduce compute costs for frequently run, complex queries.
C.They automatically increase warehouse size during load.
D.They bypass the need for any indexing on base tables.
AnswerB

Materialized views store precomputed results, allowing Snowflake to retrieve data without re-executing the expensive underlying logic. This drastically reduces the CPU time required for subsequent reads, leading to lower warehouse usage and improved performance for recurring queries that access aggregated or filtered datasets on a frequent basis.

Why this answer

Materialized views precompute results for complex or expensive queries. By storing the results in a persistent format that is automatically maintained by Snowflake, subsequent queries against the view can avoid the heavy computational cost of the underlying query. This is particularly beneficial for queries that involve heavy aggregations or complex filtering that are executed frequently by users.

Exam trap

Candidates often assume materialized views are only for storage savings, overlooking their primary computational benefit for expensive query patterns.

47
MCQmedium

A Snowflake architect is analyzing a query that performs a large join between a fact table and a dimension table. The query profile shows that the join operation is spilling to local disk. The architect wants to reduce the spillage and improve performance. Which action should the architect take first?

A.Increase the size of the virtual warehouse used for the query.
B.Enable the Query Acceleration Service on the warehouse.
C.Rewrite the query to use a smaller dimension table.
D.Add a clustering key to the fact table on the join column.
AnswerA

Increasing the warehouse size provides more memory and compute resources, which can reduce or eliminate spilling to local disk. Spilling occurs when the operation's working set exceeds available memory. A larger warehouse has more memory per node, allowing the join to process more data in memory. This is often the quickest and most effective first step to address spilling.

Why this answer

Spilling to local disk during a join indicates that the operation requires more memory than available. Increasing the virtual warehouse size provides more memory and compute resources, allowing the join to process data in memory and reducing spillage. This is a direct and effective first step.

Other options may help in specific cases but do not address the immediate memory constraint.

Exam trap

The trap here is assuming that clustering or query acceleration will fix join spilling, when the primary cause is insufficient memory for the join operation.

48
Multi-Selecthard

Which TWO of the following statements about the Query Acceleration Service are correct? (Choose two.)

Select 2 answers
A.It automatically scales up the warehouse size for all queries.
B.It is intended for queries with large, compute-intensive scan or aggregation operations.
C.It effectively replaces the need for clustering keys.
D.It can be enabled at the warehouse level to improve performance for specific queries.
E.It is always free of charge.
AnswersB, D

The service is specifically designed to handle large scans and aggregations that take longer than average. By offloading these pieces to extra nodes, the service reduces the overall execution time of the query, making it an excellent optimization for workloads that involve massive datasets and heavy compute demands.

Why this answer

The Query Acceleration Service is an opt-in feature designed to improve the performance of complex, large-scale scan and aggregation queries. It works by dynamically providing extra compute resources to a query that would otherwise be throttled. It is only useful for queries with high variance in performance, where specific parts of the query take significantly longer than the rest of the execution.

Exam trap

Candidates mistakenly believe Query Acceleration Service automatically speeds up all queries. They miss that it only targets specific, large, compute-intensive scan or aggregation operations that are currently bottlenecked.

49
MCQhard

A data architect is analyzing a slow-performing query that joins a large fact table with a small dimension table. The Query Profile shows that the join is executed as a broadcast join, and the dimension table is small enough to fit in memory. However, the query still takes a long time because the fact table is not pruned effectively. The fact table is clustered by date, and the query filters on a specific date range. Which action should the architect take to improve pruning and overall performance?

A.Convert the broadcast join to a hash join by increasing the warehouse size.
B.Create a materialized view that pre-joins the fact and dimension tables.
C.Ensure that the date filter is applied as a predicate pushdown and that the clustering key is active.
D.Add a clustering key on the join key of the fact table.
AnswerC

Predicate pushdown ensures that the date filter is applied at the scan level, allowing Snowflake to prune micro-partitions based on the clustering key. If the filter is not pushed down or if the clustering key is not active (e.g., due to stale clustering), pruning will be ineffective. Verifying that the clustering key is active and that the query uses the filter correctly can restore pruning efficiency and reduce the amount of data scanned, directly improving performance.

Why this answer

The fact table is already clustered by date, and the query filters on a date range, so pruning should be effective if the predicate is pushed down and the clustering key is active. The architect should verify that the date filter is applied at the scan level and that the clustering key is not stale. This directly addresses the excessive data scanning shown in the Query Profile, whereas other options do not target the pruning problem.

Exam trap

The trap here is assuming that adding more clustering keys or increasing warehouse size will solve pruning issues, when the real problem is often that the existing clustering key is not being utilized due to predicate pushdown failures or stale clustering.

50
MCQmedium

A data architect is designing a performance monitoring strategy for a Snowflake account. They need to identify queries that are consuming the most resources over time to prioritize optimization efforts. Which Snowflake feature should they use to analyze historical query performance and resource consumption?

A.ACCOUNT_USAGE.QUERY_HISTORY view
B.INFORMATION_SCHEMA.QUERY_HISTORY function
C.WAREHOUSE_LOAD_HISTORY view
D.Query Profile in the Snowflake web interface
AnswerA

The ACCOUNT_USAGE.QUERY_HISTORY view provides detailed historical data on all queries executed in the account, including execution time, bytes scanned, credits used, and other resource metrics. It retains data for up to 365 days, making it ideal for analyzing long-term trends and identifying high-resource-consuming queries. This view is the primary tool for performance monitoring and optimization prioritization in Snowflake.

Why this answer

To analyze historical query performance and resource consumption across the account, the architect should use the ACCOUNT_USAGE.QUERY_HISTORY view. It retains up to 365 days of data and includes metrics like execution time, bytes scanned, and credits used, enabling identification of high-resource queries. Other options either have limited retention, scope, or granularity, making them less suitable for long-term performance monitoring.

Exam trap

The trap here is confusing real-time diagnostic tools like Query Profile with historical monitoring views, when long-term analysis requires a persistent, account-wide data source like ACCOUNT_USAGE.QUERY_HISTORY.

51
MCQhard

A data architect is analyzing a query that performs poorly due to excessive data shuffling during a large join operation. The query joins two large tables on a non-clustered key. Which Snowflake feature can help reduce data shuffling by co-locating related data?

A.Multi-cluster warehouse
B.Search Optimization Service
C.Query Acceleration Service
D.Clustering the tables on the join key
AnswerD

Clustering a table on the join key physically sorts the data by that key, which can allow the optimizer to perform co-located joins or reduce data movement. When both tables are clustered on the join key, matching rows are more likely to reside on the same micro-partitions, minimizing shuffle during the join operation.

Why this answer

Clustering the tables on the join key helps co-locate matching rows, reducing the need to shuffle data across nodes during a join. This can significantly improve performance for large joins. The other options address different performance aspects: Search Optimization for point lookups, Query Acceleration for scan-heavy queries, and multi-cluster warehouses for concurrency.

Exam trap

The trap here is confusing features that improve query performance with those that specifically reduce data shuffling; clustering directly influences data layout for joins.

52
MCQmedium

An architect is investigating why a query that joins a 10 TB fact table to a small dimension table runs slowly. The query profile shows a Broadcast Join operator and a high percentage of time spent in the Join node. The fact table is not clustered on the join key. Which action is most likely to improve performance?

A.Force the optimizer to use a hash join instead of a broadcast join.
B.Increase the size of the virtual warehouse used to run the query.
C.Add a clustering key on the fact table's join column.
D.Enable the Search Optimization Service on the fact table.
AnswerC

Clustering the fact table on the join column co-locates rows with similar join key values, enabling more effective partition pruning and reducing the amount of data scanned and shuffled during the join. This can lower the join operator's elapsed time and I/O. While clustering has maintenance costs, it directly targets the large-table side of the join and can improve performance when the join key is a common filter or join predicate.

Why this answer

Clustering the large fact table on the join column aligns micro-partitions with the join key, allowing Snowflake to prune partitions and reduce the volume of data read and redistributed during the join. This directly addresses the high time in the Join node. Other options either target different workloads (Search Optimization), add cost without fixing I/O (larger warehouse), or rely on unsupported hints (forcing join type).

Exam trap

The trap here is assuming that scaling up the warehouse always fixes slow joins, when the real bottleneck is often data movement and scanning of an unclustered large table.

53
MCQeasy

A Snowflake architect is reviewing a query that runs slowly. The query profile shows that the most time is spent in the TableScan operator, and the operator details indicate that a large number of micro-partitions were scanned. The architect wants to reduce the number of micro-partitions scanned. Which action is most likely to achieve this?

A.Use a materialized view that pre-aggregates the data.
B.Increase the size of the virtual warehouse.
C.Enable the Search Optimization Service on the table.
D.Add a clustering key on the column used in the WHERE clause.
AnswerD

Clustering on the column used in the WHERE clause co-locates similar values in the same micro-partitions, improving pruning. When the query filters on that column, Snowflake can skip micro-partitions that do not contain matching values, reducing the number scanned. This directly addresses the issue of scanning too many micro-partitions and is the most effective action for this scenario.

Why this answer

Clustering on the column used in the WHERE clause improves pruning by organizing data so that similar values are stored together. This allows Snowflake to skip micro-partitions that do not contain matching values, reducing the number scanned. Increasing warehouse size does not reduce partitions scanned, and search optimization is more suited for selective lookups.

Therefore, clustering is the most effective action.

Exam trap

The trap here is thinking that a larger warehouse will reduce the amount of data scanned, when it only increases compute speed and does not improve pruning.

54
MCQmedium

A data engineer is experiencing slow query performance on a large table. The query filters by a high-cardinality column that is not the clustering key. Which optimization technique should the engineer prioritize to improve performance?

A.Increase the warehouse size to maximum.
B.Apply a materialized view with a filter.
C.Enable the Search Optimization Service on the table.
D.Change the table clustering key to the high-cardinality column.
AnswerC

The Search Optimization Service is specifically designed to accelerate point-lookup queries on large tables. By maintaining a highly efficient search index, it allows Snowflake to bypass traditional partition scanning, ensuring that filters on non-clustered, high-cardinality columns return results rapidly without the overhead of manual data re-clustering or full table scans.

Why this answer

Search optimization service is the ideal choice for high-cardinality columns used in point-lookup queries. Unlike clustering, which reorders data, the search optimization service creates a persistent search index, allowing Snowflake to prune partitions effectively even when queries do not align with the table's natural clustering key. This reduces total scanning and improves response times for point-lookups on large tables significantly.

Exam trap

Candidates often suggest clustering the table by the high-cardinality column, which can lead to excessive micro-partitioning and high maintenance costs without guaranteeing the performance gains of an index.

55
MCQmedium

Which approach is most effective for optimizing queries that frequently filter by multiple columns simultaneously?

A.Use a single clustering key with high cardinality.
B.Apply a multi-column clustering key.
C.Create separate materialized views for each filter.
D.Store all data in a single JSON column.
AnswerB

Clustering by multiple columns is an effective way to optimize queries that filter on several attributes. It helps the Snowflake engine prune partitions based on the combined range values of those columns, ensuring that only the relevant data is scanned, which is ideal for complex, multi-dimensional query patterns.

Why this answer

When queries frequently filter by multiple columns, clustering the table by those specific columns is highly effective. Snowflake's micro-partitioning tracks the min/max values for each column. By ensuring these columns are clustered together, the engine can prune partitions much more aggressively.

This minimizes the amount of data read, resulting in faster query performance for multi-dimensional filter conditions on large tables.

Exam trap

Candidates often apply a single clustering key for multi-column filter queries, which fails to leverage micro-partition min/max ranges across multiple dimensions.

56
MCQmedium

Which Snowflake feature helps minimize query latency by avoiding re-computation for identical queries?

A.Query Acceleration Service.
B.Result Caching.
C.Materialized Views.
D.Automatic Clustering.
AnswerB

Result caching is a native feature that automatically stores query results in a cache. Subsequent execution of the same query retrieves the saved results, completely avoiding the need for compute resources. This is one of the most effective ways to optimize performance for repetitive dashboard or reporting queries.

Why this answer

The Result Cache is an automatic, managed feature that stores the output of identical queries. When a user runs the exact same query again, Snowflake retrieves the result directly from the cache rather than re-computing it. This provides near-instantaneous performance for repeated workloads and is a key component of Snowflake's performance optimization strategy, reducing both latency and unnecessary compute costs for end users.

Exam trap

Candidates often confuse the Result Cache with the Warehouse Cache (Local Disk Cache). Result Caching is specific to identical query results, whereas Warehouse Cache stores data blocks.

57
MCQhard

A SnowPro Advanced Architect is analyzing a query that performs a large aggregation over a fact table. The query profile shows that the Aggregation operator is spilling to local disk. The architect wants to reduce spilling and improve performance. Which action is most likely to help?

A.Add a clustering key on the group-by columns to reduce the number of groups.
B.Enable the Query Acceleration Service to offload the aggregation to shared compute.
C.Increase the warehouse size to provide more memory per node.
D.Rewrite the query to use a window function instead of a GROUP BY.
AnswerC

Aggregation spilling to local disk occurs when the aggregation state exceeds available memory. Scaling up the warehouse increases the memory available per node, which can allow the aggregation to complete in memory. This directly addresses the spilling symptom. While it may increase cost, it is a targeted fix for memory-intensive aggregations, especially when the query cannot be rewritten to reduce cardinality.

Why this answer

Spilling to local disk during aggregation indicates that the aggregation state exceeds available memory. The most direct remedy is to increase memory per node by scaling up the warehouse. This allows the aggregation to be processed in memory, reducing or eliminating spilling.

Other options either do not target memory usage or may worsen it. While scaling up increases cost, it is often the simplest and most effective fix for memory-bound aggregations.

Exam trap

The trap here is assuming that clustering or query acceleration will fix aggregation spilling, when the issue is memory capacity for the aggregation state, not data pruning or offloading.

58
MCQeasy

Which Snowflake feature should be used to monitor and identify slow-running queries across the entire account for performance tuning?

A.Snowflake Data Marketplace.
B.Query History in the web interface.
C.Warehouse auto-suspend settings.
D.Snowpipe auto-ingest configuration.
AnswerB

The Query History tool provides comprehensive visibility into all queries executed in the account. It allows users to filter, sort, and analyze query performance metrics such as execution time, warehouse usage, and bytes scanned. It is the primary interface for identifying inefficient queries that need further tuning.

Why this answer

The Query History page in the Snowflake web interface or the SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY view are the standard tools for monitoring. They allow administrators to inspect execution time, bytes scanned, partition pruning efficiency, and spilling events. These metrics are vital for identifying bottlenecks and determining which queries require optimization, such as adding clustering keys or adjusting warehouse sizes for better throughput.

Exam trap

Candidates often look to warehouse settings or resource monitors for performance tuning, missing that query-level diagnostics live in the Query History.

59
MCQeasy

A Snowflake architect is reviewing a query that performs a large aggregation over a fact table. The Query Profile shows that the aggregation is spilling to local disk. The warehouse is a Medium size. The architect wants to reduce or eliminate spilling to improve performance. Which action is most likely to achieve this?

A.Increase the warehouse size to Large.
B.Enable the Query Acceleration Service.
C.Add a clustering key on the group-by columns.
D.Create a materialized view for the aggregation.
AnswerA

Increasing the warehouse size provides more memory and compute resources per node, which can reduce or eliminate spilling to local disk. A larger warehouse has more memory available for aggregation operations, allowing them to complete in-memory. This directly addresses the spilling issue shown in the Query Profile. While it increases cost, it is often the most straightforward solution for memory-intensive operations like large aggregations.

Why this answer

Spilling to local disk occurs when an operation requires more memory than the warehouse can provide. Increasing the warehouse size adds more memory per node, allowing the aggregation to complete in-memory and eliminating spilling. While other options might offer some benefits, they do not directly provide additional memory to the operation.

Scaling up the warehouse is the most direct and effective solution for memory-intensive operations that are spilling.

Exam trap

The trap here is assuming that clustering or Query Acceleration Service will solve spilling, when spilling is fundamentally a memory limitation that requires more memory per node.

60
MCQmedium

A SnowPro Advanced Architect is configuring a virtual warehouse for a workload that runs a mix of short ad-hoc queries and long-running ETL jobs. The architect wants to prevent long-running ETL jobs from monopolizing the warehouse and degrading ad-hoc query performance. Which approach is most appropriate?

A.Configure the warehouse to use multi-cluster mode with a minimum of two clusters.
B.Enable the Query Acceleration Service on the warehouse to offload portions of the ETL jobs.
C.Set the STATEMENT_TIMEOUT_IN_SECONDS parameter to a low value to terminate long ETL queries.
D.Create a separate warehouse for ETL jobs and use resource monitors to control credit usage.
AnswerD

Separating ETL and ad-hoc workloads onto different warehouses isolates compute resources, preventing ETL jobs from impacting ad-hoc query performance. Resource monitors can then be attached to the ETL warehouse to cap credit consumption and alert on usage. This is a standard Snowflake best practice for workload isolation and cost control, directly addressing the contention issue without changing query logic.

Why this answer

Workload isolation is best achieved by dedicating separate virtual warehouses to different workload types. ETL jobs and ad-hoc queries have different resource profiles and SLAs; putting them on the same warehouse causes contention. A separate ETL warehouse with its own resource monitor allows the architect to control costs and prevent ETL from affecting ad-hoc performance.

Other options either do not isolate workloads or introduce disruptive side effects.

Exam trap

The trap here is thinking that multi-cluster warehouses or query acceleration can solve workload contention, when the real solution is to separate workloads onto different warehouses.

61
Multi-Selectmedium

A Snowflake architect is optimizing a virtual warehouse that serves a mix of short ad-hoc queries and long-running ETL jobs. Users report that ad-hoc queries sometimes wait in the queue for several minutes during ETL execution. The architect wants to reduce queuing without increasing costs unnecessarily. Which two actions should the architect take? (Choose two.)

Select 2 answers
A.Enable multi-cluster warehouse with a minimum of 2 clusters.
B.Increase the size of the existing warehouse to X-Large.
C.Create a separate warehouse for ETL jobs and another for ad-hoc queries.
D.Set the warehouse to auto-suspend after 60 seconds of inactivity.
E.Set the STATEMENT_QUEUED_TIMEOUT_IN_SECONDS parameter to a low value.
AnswersA, C

Enabling multi-cluster warehouse allows Snowflake to automatically add clusters when queries are queued, reducing wait times for ad-hoc queries during peak ETL loads. Setting a minimum of 2 clusters ensures that there is always additional capacity available, so short queries can run concurrently with ETL jobs without waiting. This directly addresses the queuing issue while maintaining performance for both workloads.

Why this answer

To reduce queuing for ad-hoc queries during ETL execution, the architect should either enable multi-cluster warehouse to add capacity dynamically or separate the workloads onto different warehouses. Multi-cluster warehouse with a minimum of 2 clusters ensures additional compute is available for queued queries. Separating ETL and ad-hoc workloads eliminates contention entirely.

Both actions directly address the root cause of queuing without unnecessarily increasing costs, as they can be scaled independently.

Exam trap

The trap here is thinking that increasing warehouse size or changing timeout parameters will solve queuing, when queuing is a concurrency issue that requires more clusters or workload isolation.

62
Multi-Selecthard

A SnowPro Advanced Architect is tuning a virtual warehouse that experiences high concurrency during peak hours. The architect observes that queries are queuing, and the warehouse is not fully utilizing its resources. Which TWO actions should the architect take to improve concurrency? (Choose two.)

Select 2 answers
A.Enable the Query Acceleration Service on the warehouse to handle queued queries.
B.Enable multi-cluster warehouse mode and set a minimum and maximum cluster count.
C.Increase the warehouse size to add more compute nodes per cluster.
D.Use a separate warehouse for different user groups to distribute the load.
E.Set the warehouse to auto-suspend after a short period to free up resources for other warehouses.
AnswersB, D

Multi-cluster warehouses automatically add clusters when queries queue, allowing the warehouse to scale out for concurrency. Setting a minimum and maximum cluster count controls the scaling range and cost. This directly addresses queuing by providing more compute resources during peak periods. It is the standard Snowflake feature for handling high concurrency without manual intervention, and it can scale back down when demand subsides.

Why this answer

High concurrency with queuing is best addressed by scaling out compute resources. Multi-cluster warehouses automatically add clusters to handle queuing, and setting min/max clusters controls the scale. Separating workloads onto different warehouses distributes load and reduces contention.

Scaling up, auto-suspend, and Query Acceleration Service do not directly improve concurrency; they address different problems such as per-query performance, cost control, or specific query offloading.

Exam trap

The trap here is confusing scaling up with scaling out, or assuming that Query Acceleration Service can resolve queuing, when concurrency is best solved by adding clusters or isolating workloads.

63
MCQhard

An architect needs to optimize a dashboard that frequently queries a multi-terabyte table. The queries involve complex aggregations on several columns and a join to a small dimension table. The dashboard allows users to filter by any combination of five different dimensions. Which optimization strategy is most appropriate?

A.Enable Search Optimization on all five dimension columns.
B.Implement a Materialized View that pre-aggregates the data by the five dimensions.
C.Use a Cluster Key on the dimension table to speed up the joins.
D.Increase the Warehouse size to reduce the time for aggregations.
AnswerB

Materialized Views are ideal for this scenario because they can pre-calculate the aggregations across the required dimensions. When a user queries the dashboard, Snowflake can pull the pre-computed results directly from the view, avoiding the need to scan the multi-terabyte fact table and perform expensive calculations repeatedly for every user.

Why this answer

Materialized Views are highly effective for queries that involve complex aggregations and joins on large datasets where the results can be pre-calculated. Unlike the Search Optimization Service, which is for point lookups, Materialized Views store the actual result of the query. This significantly reduces the compute required at runtime for dashboards with repetitive aggregation patterns.

Exam trap

Candidates often suggest Search Optimization Service for aggregations, confusing it with point-lookup optimization, or they suggest clustering, which is less efficient for complex multi-dimensional aggregations than materialized views.

Ready to test yourself?

Try a timed practice session using only Performance Optimization questions.