Missing Index Mishaps

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

Great Video. Sound only on the left side...

oneofthepagans
Автор

For the sake of completeness... how would you refactor the stored procedure for better estimates?

stefanotorelli
Автор

Great video Erik! Thanks!

If someone runs into this situation, and they need BOTH queries to be fast, I'd assume a "hot" fix would be to add an index hint on the original query that now takes 14 seconds to run? How does SQL Server react in your scenario if you do so?

Also, I think for some reason the sound only plays out of the left speaker for this video.

sqldevdba
Автор

so what happens when you add the missing index to cover the query in the stored proc (on OwnerUserid, ParentId, PostTypeID) ? Would the optimizer choose that over the second missing index with ParentID as the leading column? I assume so...

josephobrien