exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 4 question 4 discussion

Actual exam question from Microsoft's DP-300
Question #: 4
Topic #: 4
[All DP-300 Questions]

You have an Azure SQL database.
You discover that the plan cache is full of compiled plans that were used only once.
You run the select * from sys.database_scoped_configurations Transact-SQL command and receive the results shown in the following table.

You need relieve the memory pressure.
What should you configure?

  • A. LEGACY_CARDINALITY_ESTIMATION
  • B. QUERY_OPTIMIZER_HOTFIXES
  • C. OPTIMIZE_FOR_AD_HOC_WORKLOADS
  • D. ACCELERATED_PLAN_FORCING
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
klever
Highly Voted 3 years, 2 months ago
Option C is correct The optimize for ad hoc workloads option is used to improve the efficiency of the plan cache for workloads that contain many single use ad hoc batches. When this option is set to 1, the Database Engine stores a small compiled plan stub in the plan cache when a batch is compiled for the first time, instead of the full compiled plan. This helps to relieve memory pressure by not allowing the plan cache to become filled with compiled plans that are not reused. Article: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option?view=sql-server-ver15
upvoted 10 times
...
testdumps2017
Most Recent 9 months, 1 week ago
for the exam, option C is correct. for real life, not really:https://erikdarlingdata.com/no-really-dont-optimize-for-ad-hoc-workloads-as-a-best-practice/
upvoted 4 times
...
Pranava_GCP
1 year ago
Selected Answer: C
C is correct, C. OPTIMIZE_FOR_AD_HOC_WORKLOADS When this option is set to 1, the Database Engine stores a small compiled plan stub in the plan cache when a batch is compiled for the first time, instead of the full compiled plan. This may help to relieve memory pressure by not allowing the plan cache to become filled with compiled plans that aren't reused.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago