LATCH_DT Wait Type in SQL Server

Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: PAGELATCH_EX Wait TypeRelated pillar: Performance & Troubleshooting

LATCH_DT is a wait for a latch in Destroy (DT) mode on an internal SQL Server structure that is not a data or index page. Destroy mode is the strongest latch mode, taken when a structure is being torn down, and it is incompatible with every other latch mode. The wait type exists mainly so every latch mode has a corresponding LATCH_* wait; DT acquisitions are rare and brief.

As with all LATCH_* waits, the name alone tells you little. The latch class in sys.dm_os_latch_stats names the actual subsystem involved.

Is It a Problem?

Almost never. LATCH_DT should be one of the smallest numbers in your wait profile, if it appears at all. Structures get destroyed constantly (caches trimmed, buffers freed) without measurable waits. If it ever accumulates real time, treat it as a symptom of severe contention on one internal structure and identify the latch class before theorising.

Note that sys.dm_os_latch_stats groups all non-page latch modes together per class, so you diagnose by class, not by mode.

Common Causes

  • Routine teardown of internal structures during cache churn, normally invisible.
  • Heavy concurrent activity against one internal structure that is also being destroyed and rebuilt frequently, for example under extreme plan cache or temp object churn.

What To Do

  1. Query sys.dm_os_latch_stats ordered by wait_time_ms and note the top latch classes; that, not the DT mode, is your lead.
  2. Correlate with what changed: workload spikes, cache flushes, memory pressure trimming caches aggressively.
  3. Address the subsystem the class points at (plan cache churn, temp table churn, and similar), the same way you would for LATCH_EX contention.
  4. If nothing correlates and the number is trivial, leave it alone.

How To See It

Rank it against everything else with Get-WaitStatistics, then break latch time down by class with sys.dm_os_latch_stats.


Where To Go Next

LATCH_DT is background noise on a healthy instance. If you are chasing a real problem, start with the waits that actually cost you time.

Related waits: LATCH_EX · LATCH_KP · LATCH_NL

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *