Quantcast
Channel: SQL Memory Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 93

SQL SERVER – Is Query from Cache? Execution Plan Property

$
0
0

Recently I was asked by my client of Comprehensive Database Performance Health Check, is there any way to know if the executed query is from cache or not. Well, of course, there is an easy way to know this and that is Execution plan property. Let us learn about it today.

First, run any query with an execution plan. There are multiple ways to enable execution plans. I have previously blogged about it here: SQL SERVER – 3 Different Ways to Explore Actual Execution Plans.

SQL SERVER - Is Query from Cache? Execution Plan Property executionplanproperty-800x426

Now that you have enabled the execution plan, run the query. Once the query is run, right-click on the leftmost operator (if you have run the SELECT statement, it will be the SELECT operator) and go to properties. Now on the right side expand the section OptimizerStatsUsage. Under this section, you will see all the statistics used for that particular query.

SQL SERVER - Is Query from Cache? Execution Plan Property executionplanproperty1

SQL SERVER - Is Query from Cache? Execution Plan Property executionplanproperty2

I hope this helps you to further troubleshoot your queries which are giving you trouble with performance. Execution plan property is very handy tool.

Here are my few recent videos and I would like to know what is your feedback about them. Do not forget to subscribe SQL in Sixty Seconds series. I hope you appreciate learning about the Last 5 SQL in Sixty Seconds Video.

If you have any questions, you can always reach out to me on Twitter.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

First appeared on SQL SERVER – Is Query from Cache? Execution Plan Property


Viewing all articles
Browse latest Browse all 93

Trending Articles