PREEMPTIVE_OS_QUERYREGISTRY is a generic wait for threads calling Windows registry functions. SQL Server consults the registry for assorted configuration (service settings, network configuration, some feature lookups), and xp_regread and friends route here too. The thread runs preemptively until the registry call returns.
Normally a background triviality, with one version-specific exception worth knowing.
Is It a Problem?
Historically no, but SQL Server 2022 shipped a known bug that made this wait a genuine contention point, fixed in 2022 CU5. If you run 2022 below CU5 and this wait ranks anomalously high, the diagnosis is your patch level, not your workload.
Outside that defect, meaningful accumulation usually traces to code calling registry-reading procedures (xp_regread, xp_instance_regread) at high frequency, monitoring scripts being the usual culprits.
Common Causes
- The SQL Server 2022 pre-CU5 defect.
- Monitoring or audit scripts hammering
xp_regread-family procedures. - Normal configuration lookups (trivial amounts).
What To Do
- On SQL Server 2022: confirm CU5 or later; patch if not.
- Otherwise, find the registry-reading callers via
sys.dm_exec_requestsduring the wait and moderate their frequency. - Registry reads themselves are fast when healthy; sustained slowness would implicate the OS, which is a different investigation.
How To See It
Rank it against everything else with Get-WaitStatistics; on 2022, its prominence is a patch-level question first.
Part of the SQL Server Wait Types Library.
Related deep dive: SOS_SCHEDULER_YIELD Wait Type.
Leave a Reply