QDS_STMT

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This wait type is when a thread is waiting for access to the Query Store map of query hashes to track that a previously-untracked query was executed.

(Books Online description: N/A)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

2014

Removed in SQL Server version:

N/A

Extended Events wait_type value:

Maps to the QDS_OPEN_ADDR_HASH_MAP map_value in sys.dm_xe_map_values.

The map_key value in sys.dm_xe_map_values is 982 in 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

The Query Store keeps track of which queries have executed by making note of the query hash for each query. When a previously-untracked query is executed, the query hash map needs to be latched exclusively to add a new hash. For a very busy ad hoc workload, this can lead to a bottleneck and this wait type becomes prevalent. To work around this, make sure that the QUERY_CAPTURE_MODE is set to AUTO and try to parameterize as many queries as possible to reduce the number of distinct query hashes. It may also be that your workload is not suitable to being tracked by Query Store, in which case, disable it.

Known occurrences in SQL Server (list number matches call stack list):

  1. TBD

Abbreviated call stacks (list number matches known occurrences list):

  1. TBD