99% Cost Improvement in This SQL - See How It’s Done

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

It's one thing to know the theory of SQL performance, but it's another to see it in action.

In this video, we'll start with a query that runs OK but is not very efficient, and work through some steps and attempt to improve the cost of the query.

Some of the things I try don't work, some make it worse, and some make it better.

This is demonstrated in MySQl but the concepts are similar for other databases.

Let me know in the comments if you like this type of video.

⏱ TIMESTAMPS:
00:00 - Our query
01:00 - The execution plan
05:25 - The first index
07:35 - More indexes
11:33 - Reoganise query

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

You never disappoint! The plan goes liked this: You send and I receive an email -> I click the link and watch the video -> I learn A LOT! Thank you so very much.

sdmagic
Автор

Really really good Please make other videos about optimizing queries. It's really close to what's actually needs to be considered when working in the real tasks.

ThanhNguyen-qwus
Автор

Great demonstration Ben. Very helpful video.

gauravmanchanda
Автор

Nice, you made that really easy to understand!

angelbear_og
Автор

Interesting video. I was just curious to understand how query costs are getting calculated here. If it's not mili second or second - then what this number actually mean?

shiwanginishishulkar
Автор

I did not understand how creating index on a temporary table would improve the query. If this operation is conducted every time this query runs, doesn't it increase the cost?

usamesavas
Автор

I wish I were able to get that tool you're using for the flow chart but I can't find it in SQL Server (assuming that's where you're doing this).
Is there ever a case to add multiple columns to an index?

tomservo
Автор

nice video, is there a similar feature (Execution plan and graph representation) in Oracle Database ?

michelchaghoury