Dear SQL DBA cover image

Why is My Query Faster on the Second Run?

Dear SQL DBA

CHAPTER

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.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner