Can you force a plan for a different query with Query Store?

This is question I’ve gotten a few times in class…Can you force a plan for a different query with Query Store? tl;dr No. Assume you have two similar queries, but they have different query_id values in Query Store.  One of the queries has a plan that’s stable, and I want to force that plan for […]

Query Store and the Plan Cache Flushing

I’ve had two comments recently on my blog about Query Store causing the plan cache to be flushed. There was a known issue related to the plan cache flushing after Query Store was enabled, but this was fixed in CU2 for SQL Server 2016 SP1. So I did some testing and here is what I think […]

Why aren’t you using Query Store?

Way back in 2016 I wrote a post trying to find out why people were not using Extended Events.  See, I really like Extended Events, and I’d been presenting on the topic for several years, but I kept running into people who wouldn’t even try XE.  There were also a lot of individuals who declared […]

Query Store Examples: Stories from customers

In the past week I’ve used Query Store to troubleshoot performance issues for two different customers running SQL Server 2016 and higher.  I’ve presented a lot of sessions about what Query Store is, how to configure it, and basic use cases, but we really take it to the next level when we can provide Query Store examples from […]

Query Store Requests

In early January Microsoft announced that Connect, the method for filing SQL Server bugs and feature requests, was being retired.  It was replaced by User Voice, and any bugs/requests were ported over.  Sadly, the votes from Connect did not come across to User Voice, so I went through and found all the Query Store requests, […]

Query Store Fix in SQL Server 2017

There is a Query Store fix in the latest Cumulative Updates of SQL Server 2017, and if you are keeping current with the latest cumulative updates, there’s a script you need to run if you’ve installed CU2 at any point. First, if you are still on CU2, you might want to consider upgrading to CU4 […]

Query Store and “in memory”

If you’ve ever been to one of my sessions you know that I really like demos.  I find they can illustrate how things work extremely well and I use them to compliment an explanation.  I’m a very visual learner so it also helps me to understand and then explain a concept.  The drawback of demos […]

Query Store Settings

In SQL Server 2017 there are nine (9) settings related to Query Store.  While these are documented in sys.database_query_store_options, I often get asked what the value for each setting “should” be.  I’ve listed out each setting below, along with the default value and considerations around changing the setting.   OPERATION_MODE The default value for a […]

Query Store and Availability Groups

Last week at the PASS Summit I presented a pre-con and general session on Query Store. I had several questions related to Query Store and Availability Groups, so I thought I’d pull them all together and answer them here.   Q: What happens to the Query Store data when a database is in an Availability […]

Query Store Pre-Con at PASS Summit: More Details

In the time since my last post about my Query Store pre-con at the PASS Summit (it’s just about a month away!) I’ve gotten several more questions about the session.  I’ve consolidated them and provided answers here, and if anyone still wants to know more, please email me! What version of SQL Server will you […]

Changes to query text and the effects in Query Store

In this week’s Insider newsletter, Paul talked about an interesting customer issue I ran into last week related to Query Store, and an inadvertent change to a query’s text.  I thought I’d provide some demo code so that those of you using (or planning to use) Query Store could see how this shows up in […]

Query Store Pre-Con at the PASS Summit: Is it right for you?

I received an email over the weekend asking about my pre-con at the PASS Summit, my general session at the Summit, and my Query Store course on Pluralsight. The individual wanted to know the requirements for the pre-con, and what overlap exists between these three. Great question. First, feel free to review the abstracts for […]

PASS Summit Pre-Con on Query Store

PASS has announced the pre-cons for this year’s Summit and I am *thrilled* to have the opportunity to present one centered around Query Store! This is a topic I’ve been presenting on since before SQL Server 2016 was released in June last year.  I’m ridiculously excited about it.  I’m already developing new content and demos […]

Query Store Trace Flags

Microsoft maintains a list of supported trace flags and I noticed that there are two new ones related to Query Store: 7745 and 7752.  The descriptions for these Query Store Trace Flags are pretty straight-forward, but for those of you not familiar with Query Store, I thought I’d provide some context and details. 7745 When […]

Upcoming Query Store Sessions

This past weekend at SQLSaturday Cleveland I presented a new session related to Query Store, Ensuring Plan Stability with Query Store.  I went into detail on forcing plans with Query Store and how that compares to Plan Guides, and I had some great questions – it was a really fun presentation.  However, I know a […]

Forced Plans and Compatibility Mode

A question came up recently about plan guides and compatibility mode, and it got me thinking about forced plans in Query Store and compatibility mode.  Imagine you upgraded to SQL Server 2016 and kept the compatibility mode for your database at 110 to use the legacy Cardinality Estimator.  At some point, you have a plan […]

SQLSaturday Cleveland 2017

Cleveland peeps – we are a week away from SQLSaturday Cleveland, are you registered?!  There’s still time if you’re not, AND there is still time to register for one of the fantastic pre-cons we’re hosting this year.  Your options: Tuning Your Biggest Queries with Adam Machanic Data Analytics with SQL Server 2016, R, & Power […]

T-SQL Tuesday #86: Storing and Accessing the Query Store Data

The crew over at Brent Ozar Unlimited is hosting this month’s T-SQL Tuesday, and the request was to find an interesting Connect item (bug fix or enhancement request) and write about it.  I’ve been knee-deep in Query Store, and there are two Connect items that immediately came to mind. One of the primary uses of […]

SQL Server Query Store: Default Settings

Last week I wrote a quick post about storage settings for Query Store.  Today I’m going to take a moment to discuss the default settings that are applied when you initially enable Query Store.  I’m not going go through all the settings and what they mean, you can find that information here.  But I do […]

SQL Server Query Store: Data Storage Options (and a Request!)

Microsoft recently announced that SQL Server 2016 RTM will be available June 1, 2016, and it was also confirmed that Query Store will be available in ALL editions of SQL Server.  This is pretty exciting, as there was some concern that it would be Enterprise-only.  I’ve done a couple sessions on Query Store this year, […]