A data analyst queries a large sales table partitioned by region and year. Which query pattern enables partition pruning?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Partition pruning requires predicates on the partition columns (region; year) in the WHERE clause; the query optimizer then skips all partitions not matching EMEA/2024; scanning only the relevant data files.
Full explanation below image
Full Explanation
Partition pruning requires predicates on the partition columns (region; year) in the WHERE clause; the query optimizer then skips all partitions not matching EMEA/2024; scanning only the relevant data files. The incorrect options ("SELECT FROM sales ORDER BY sale_date LIMIT 1000", "SELECT FROM sales WHERE revenue > 1000000", "SELECT COUNT(*) FROM sales") are distractors that don't fully capture the concept described.