Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Interpret performance metrics

A worked example

Single answer

You manage SQL Server on an Azure virtual machine. Wait statistics were cleared at the start of the business day. At the end of the day, you query sys.dm_os_wait_stats and get the results shown in the exhibit.

Compared with the other wait types, PAGEIOLATCH_SH has a low waiting_tasks_count but by far the highest wait_time_ms.

wait_typewaiting_tasks_countwait_time_ms
PAGEIOLATCH_SH9501,425,000
SOS_SCHEDULER_YIELD410,00061,000
LCK_M_X1408,400

Based on these results, which issue should you investigate first?

Choose one answer
Why

PAGEIOLATCH_SH is a data file I/O wait and accounts for most of the accumulated wait time. Dividing wait_time_ms by waiting_tasks_count gives an average of about 1.5 seconds per wait, supporting storage performance as the first issue to investigate. Missing indexes can also contribute to PAGEIOLATCH_SH waits, so these statistics do not establish a definitive cause. tempdb allocation contention is associated with PAGELATCH_* waits rather than PAGEIOLATCH_* waits.

  • Not correct: Missing indexes that cause large data scans. PAGEIOLATCH_SH can occur with excessive scans caused by missing indexes, but the low wait count and unusually long average wait make storage performance the first investigation here.
  • Correct: Slow storage performance for the data files. PAGEIOLATCH_SH is a data file I/O wait, and a low wait count combined with a high wait time may suggest storage performance problems; here the average wait is about 1.5 seconds.
  • Not correct: CPU pressure from busy schedulers. SOS_SCHEDULER_YIELD can indicate CPU pressure, but PAGEIOLATCH_SH dominates accumulated wait time and has a long average wait, making storage performance the stronger first lead.
  • Not correct: Blocking caused by exclusive locks. LCK_M_X frequently indicates blocking, but its total wait time in the exhibit is small compared with PAGEIOLATCH_SH.
  • Not correct: Page Free Space contention in tempdb. tempdb contention is associated with PAGELATCH_* waits; a page latch wait with IO in its name, such as PAGEIOLATCH_SH, points to an I/O issue.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free