Finding A Query In Query Store

Grant Fritchey shows us how to find a query in the Query Store:

The primary views you’ll want are sys.query_store_query and sys.query_store_query_text. They join together based on the query_text_id. Let’s take four scenarios and see if we can retrieve the correct query.

This is a little more complicated than I would have hoped, but as Grant notes, this is the CTP, so maybe there will be some tooling added to make life a little easier.

Related Posts

Finding Memory-Rich Queries

Matthew McGiffen wants to find the queries which demand the largest memory grants: I had a server that looked like it had been suffering from memory contention. I wanted to see what queries were being run that had high memory requirements. The problem was that it wasn’t happening right now – I needed to be […]

Read More

Query Store Required Permissions

Andreas Wolter takes us through exactly which permissions are required for Query Store to work: Typically, there are 3 aspects to the work with the Query Store, which can be reflected in roles: 1) Configuration – turning Query Store on and off, clearing the contents, flushing its contents to disk and changing its settings.2) Viewing the […]

Read More

Categories

January 2016
MTWTFSS
« Dec Feb »
 123
45678910
11121314151617
18192021222324
25262728293031