⚡️ Pass with Confidence Sale - 40% off ALL packages! ⚡️

2 days, 2 hours remaining!

CompTIA Data+ DA0-002 (V2) Practice Question

A dashboard application sends the following Transact-SQL statement to the OLTP database dozens of times each minute, changing only the literal value in the WHERE clause that comes from the user interface:

SELECT customer_id, order_date, total_amount
FROM sales.orders
WHERE customer_id = 12345;

The DBA observes that every execution causes SQL Server to parse and compile a new plan, and the plan cache is filling up with single-use plans for this query pattern. Without altering table structures or adding new indexes, which basic query optimization technique is most likely to cut CPU time by allowing the same execution plan to be reused across calls?

  • Add the WITH (NOLOCK) table hint to the orders table.

  • Copy the orders into a temporary table and run the filter against the temp table instead.

  • Submit the statement as a parameterized query that passes the customer_id as a bind variable.

  • Append the OPTION (RECOMPILE) hint to force the optimizer to build a fresh plan each time.

CompTIA Data+ DA0-002 (V2)
Data Acquisition and Preparation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot