November 5, 2019 at 10:42 am
Ahoi,
i am currently reading "SQL Server 2017 Query Performance Tuning" 5th edition by Grant Fritchey.
In Chapter 6: Query Performance Metrics
He suggests finding expensive and longrunning queries by using extended events. I have tested around a bit using different event libraries and configuring them. Now i have 2 questions:
I want to be the very best
Like no one ever was
November 5, 2019 at 11:21 am
the query store is a useful tool, but as soon as your proc cache changes or you reboot your server then you start losing all of the valuable information it collects.
there are quite a few articles you can find about querying data from extended events logging files, but I'm old fashioned - I like profiler traces because I can stick them straight into a table (grant will hate me for that)
my advice - use all of the tools, query store is great for identifying rogue plans... extended events and profiler for deadlocks and security issues... don't pick one over the other
MVDBA
November 6, 2019 at 8:44 am
the query store is a useful tool, but as soon as your proc cache changes or you reboot your server then you start losing all of the valuable information it collects.
there are quite a few articles you can find about querying data from extended events logging files, but I'm old fashioned - I like profiler traces because I can stick them straight into a table (grant will hate me for that)
my advice - use all of the tools, query store is great for identifying rogue plans... extended events and profiler for deadlocks and security issues... don't pick one over the other
Any idea on how to save the extended events results into a table?
I mean i cant be the first one wanting to save the results in a table.
I want to be the very best
Like no one ever was
November 6, 2019 at 8:53 am
just google it, you'll find dozens of articles
extended events sql save to table
that's what I searched for
MVDBA
November 6, 2019 at 11:13 am
the query store is a useful tool, but as soon as your proc cache changes or you reboot your server then you start losing all of the valuable information it collects.
neither proc cache changes, nor reboot affects query store
query store has its own configuration parameters (max size, max size cleanup, max plans/query, etc) which control its size and content
also, queries with (option recompile) will be captured also
November 10, 2022 at 12:57 pm
Just saw this on a search for some information on Query Store. So, I know this is three years old. However...
I forgive you Mike.
Reboots, etc., do not directly affect the data captured by Query Store. One advantage that using QS has over just looking at the DMVs is that it persists the data for a period of time.
You can output the Extended Events to a file, which is preferable. Then, read directly from that file to load everything into a table through fn_xe_file_target_read_file. Here's an example.
Apologies for posting on an old thread.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply