Complete the code to set the warehouse size to a smaller option for cost savings.
ALTER WAREHOUSE my_warehouse SET WAREHOUSE_SIZE = '[1]';
Setting the warehouse size to 'XSMALL' reduces compute costs by using fewer resources.
Complete the code to enable auto-suspend after 5 minutes of inactivity.
ALTER WAREHOUSE my_warehouse SET AUTO_SUSPEND = [1];Setting AUTO_SUSPEND to 300 seconds (5 minutes) helps save costs by suspending idle warehouses.
Fix the error in the query to limit data scanned for cost optimization.
SELECT * FROM sales_data WHERE transaction_date [1] '2023-01-01';
Using '>=' filters data from 2023-01-01 onwards, reducing scanned data and cost.
Fill both blanks to create a clustering key on the 'customer_id' column for cost-efficient queries.
ALTER TABLE sales_data CLUSTER BY ([1]([2]));
Using HASH(customer_id) clusters data by customer ID, improving query performance and reducing costs.
Fill all three blanks to create a materialized view that refreshes automatically to save compute costs.
CREATE MATERIALIZED VIEW [1] AS SELECT [2] FROM sales_data WHERE region = '[3]';
Creating a materialized view named 'mv_sales_region' with SUM(amount) for region 'US' precomputes data, saving compute costs on repeated queries.