
Why is My Query Faster on the Second Run?
Dear SQL DBA
00:00
Query Store Tracks Compile Time and Execution Plan Components
If you enable query store, it will track compile time as well as a bunch of other com ation metrics. This is available in data bases in all aditions so you can do this in standard edition. So whenever i wonder how much of this was compile time, i will come up with a version of the query i can run in a place that's safe and use set statistics time or look in the plan. That's the most often things i do. Is this worse when you have a lot of joint like you mention a their complex views? I would say sometimes.
Transcript
Play full episode