WAIT_XTP_RECOVERY Wait Type in SQL Server

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

Is It a Problem?

The wait is honest; its duration is the operational fact. It is not a known contention point, but warns that the database is not available until the thread waiting on it completes. Our SQL Server 2025 lab had a single wait of a quarter of a second. Get Wait Statistics does not filter it out, so if it ranks, you will see it.


What It Means

Microsoft’s definition: it occurs when database recovery is waiting for recovery of memory-optimized objects to finish. It occurs during crash recovery, after a failover or restore, and some database state changes, such as offline to online and read-only to read-write.


When It Does Matter

When recovery time objectives are tight and the database holds a lot of durable memory-optimized data, because that data has to be loaded before the database opens. Measure this wait during a test failover so you know the number. Keep durable memory-optimized data deliberate: SCHEMA_ONLY tables for data that need not survive a restart, and tidy up durable data that has gone stale. The baseline to monitor is its duration at each failover or restart.


The XTP Family

These are the In-Memory OLTP (XTP) waits, present on databases with a memory-optimized filegroup. Almost all of them are background checkpoint and housekeeping waits. Memory-optimized tables still write to the transaction log, so the main page for this family is WRITELOG.

  • WRITELOGLog flush. Waiting for log records to be written to disk, the log wait that costs users time.The main page for this family
  • WAIT_XTP_CKPT_CLOSECheckpoint complete. Waiting for an In-Memory OLTP checkpoint to complete.Usually noise
  • WAIT_XTP_HOST_WAITHost waits. Waits triggered by the database engine and implemented by the XTP host.Usually noise
  • WAIT_XTP_OFFLINE_CKPT_NEW_LOGWaiting for log. The offline checkpoint waiting for new log records to scan.Usually noise
  • WAIT_XTP_OFFLINE_CKPT_LOG_IOLog read. The offline checkpoint waiting for a log read to complete.Usually noise
  • WAIT_XTP_RECOVERYRecovery. Database recovery waiting for memory-optimized objects to recover.Worth a look when it climbs. This page.
  • WAIT_XTP_TASK_SHUTDOWNThread shutdown. Waiting for an In-Memory OLTP thread to complete.Usually noise
  • XTP_PREEMPTIVE_TASKBackground work. Documented as internal use only; In-Memory OLTP background work in preemptive mode.Usually noise

Where To Go Next

WAIT_XTP_RECOVERY follows database recovery. If you are chasing a real problem, start with the waits that cost you time.

Comments

Leave a Reply

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