Provisioning SQL Databases — Question 49
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets stated goals.
You manage a Microsoft SQL Server environment with several databases.
You need to ensure that queries use statistical data and do not initialize values for local variables.
Solution: You enable the PARAMETER_SNIFFING option for the databases.
Does the solution meet the goal?
Answer options
- A. Yes
- B. No
Correct answer: A
Explanation
Enabling the PARAMETER_SNIFFING option allows SQL Server to optimize query execution plans based on the actual parameters passed, which uses statistical data effectively. This approach directly addresses the goal of ensuring queries utilize statistical information. The other option, 'No', is incorrect because it overlooks the benefits of parameter sniffing in improving query performance.