exam questions

Exam 70-462 All Questions

View all questions & answers for the 70-462 exam

Exam 70-462 topic 2 question 192 discussion

Actual exam question from Microsoft's 70-462
Question #: 192
Topic #: 2
[All 70-462 Questions]

You have a default installation of SQL Server that hosts an Online Transaction Processing (OLTP) application.
Users report that they experience poor overall query performance for the application.
You query the wait statistics and discover that the two top waits are CXPACKET and SOS_SCHEDULER_YIELD.
You need to modify the SQL Server settings to resolve the issue causing the poor query performance.
Which two settings should you modify? Each correct answer presents part of the solution.

  • A. max degree of parallelism (MAXDOP)
  • B. Minimum Memory
  • C. optimize for ad hoc workloads
  • D. Boost SQL Server priority
  • E. cost threshold for parallelism
Show Suggested Answer Hide Answer
Suggested Answer: AE 🗳️
A: Lower the MAXDOP.
When high CXPACKET values are encountered, a possible issue, even in case when parallelism is evenly distributed, is when the cost of creating the parallel plan is higher than the cost of the serialized thread. This is often something that is overlooked and by the rule of thumb of reaching for altering of the Max Degree of
Parallelism (MAXDOP), by setting it to 1 (each and every query will be processed by the single CPU core). Configuring MAXDOP settings to 1 should be the last resource used in troubleshooting excessive CXPACKET wait times.
When a high CXPACKET value is accompanied with a LATCH_XX and with PAGEIOLATCH_XX or SOS_SCHEDULER_YIELD, it is an indicator that slow/ inefficient parallelism itself is the actual root cause of the performance issues. And in such a scenario if the LATCH_XX waits is
ACCESS_METHODS_DATASET_PARENT or ACCESS_METHODS_SCAN_RANGE_GENERATOR class, then it is highly possible that the parallelism level is the bottleneck and the actual root cause of the query performance issue. This is a typical example when MAXDOP should be reduced.
E: The Cost Threshold for Parallelism (CTFP) value is in seconds and it means that for every query for which SQL Server estimates that running time will be longer than 5 seconds, a parallel plan will be created.
To prevent unwanted parallelism, the CTFP number could be increased and by the aforementioned rule of thumb, a minimum value of 25. Recent analysis indicates that 50 should be the optimal minimal number for modern computers.
References:
https://www.sqlshack.com/troubleshooting-the-cxpacket-wait-type-in-sql-server/

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
Currently there are no comments in this discussion, be the first to comment!
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 ...