Advanced SQL
Q83 / 100

What is the purpose of "query plan caching" and how can parameterized queries affect it?

Correct! Well done.

Incorrect.

The correct answer is B) The database caches the execution plan for a query so repeated executions can reuse it, avoiding recompilation — though a plan optimized for one parameter set ("parameter sniffing") can be suboptimal for others

B

Correct Answer

The database caches the execution plan for a query so repeated executions can reuse it, avoiding recompilation — though a plan optimized for one parameter set ("parameter sniffing") can be suboptimal for others

Explanation

Plan caching avoids the cost of re-parsing and re-optimizing identical query shapes, but "parameter sniffing" issues can arise when a plan compiled for atypical parameter values is reused for very different data distributions.

Progress
83/100