Does SQL table join order matter?
Vložit
- čas přidán 21. 07. 2024
- Have you ever wondered if the order of the tables in your FROM clause matter?
In today's video, we look at why theoretically table join order does make a difference for performance and why SQL Server doesn't use the order you provide.
We also look at different techniques for forcing SQL Server to use the join order you specified.
Blog post with all demo code and links:
bertwagner.com/2017/11/21/doe...
Presentation by Adam Machanic on row goals:
sqlbits.com/Sessions/Event14/...
Music by Joakim Karud / joakimkarud
Follow me on Twitter:
/ bertwagner
Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: upscri.be/c77fc8/ - Věda a technologie
so happy I could find advanced SQL channel. Keep it up!
I wish I would have found this amazing channel before. You rock Bert!
That is exactly was I was searching for. Thank you!
Great explanation on JOIN orders. Definitely learned a good amount from you video! Thank you!!!
Thank you, Bert, very much.
Great explanation and tricks. Thank you
Thank you sir! Helpful video!
Thanks for sharing.
Thanks Man for the explanation
thanks for your videos!
Thanks Bert!!!
Nice vedio bert, can you make a vedio on execution plans.
Great vid indeed! Would you be able to answer a question i've asked myself for a while, but no expert I could ask to?
I've read an index can only used once for a query, does that mean for only 1 join, even if multiple different joins could use this index?
@@DataWithBert Hi Bert, thanks for the reply, this is actually never happening :D
You're right, my question was not clear.
What I am referring to is the following statement "SQL Server can use only one index for each table that is present in the query".
What does that mean exactly?
Also, if the table is present in a join and also in the WHERE clause, is it considered the same "join" or the WHERE clause is separated from the other joins that use the tables?
Thanks in advance
That´s it.
+1
Good video. Please lose the background Music(noise).