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

  Рет қаралды 4,363

Database Star

Database Star

Күн бұрын

Пікірлер: 24
@sdmagic
@sdmagic 3 ай бұрын
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.
@DatabaseStar
@DatabaseStar 3 ай бұрын
Thanks a lot! I'm glad you liked the video.
@ThanhNguyen-qw7us
@ThanhNguyen-qw7us Жыл бұрын
Really really good video!!!!! 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.
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks a lot, I'm glad you enjoyed it!
@gauravmanchanda3433
@gauravmanchanda3433 Жыл бұрын
Great demonstration Ben. Very helpful video.
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@AlexanderWeurding
@AlexanderWeurding 11 ай бұрын
Great video! Thanks for sharing!
@DatabaseStar
@DatabaseStar 11 ай бұрын
Thanks!
@angelbear_og
@angelbear_og Жыл бұрын
Nice, you made that really easy to understand!
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks, I'm glad it was easy to understand!
@CometHajjar
@CometHajjar Жыл бұрын
Very nice and informative, Thank you
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@shiwanginishishulkar4744
@shiwanginishishulkar4744 6 ай бұрын
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?
@DatabaseStar
@DatabaseStar 6 ай бұрын
The Cost number is an arbitrary number, which means it doesn't represent any length of time or anything else like disk reads. It's a calculation that can be used to compare against other plans on the database.
@michelchaghoury9629
@michelchaghoury9629 Жыл бұрын
nice video, is there a similar feature (Execution plan and graph representation) in Oracle Database ?
@DatabaseStar
@DatabaseStar Жыл бұрын
Yes there is. In Oracle SQL Developer, you can see the execution plan, but it's text based and not a chart or image like this one. Other IDEs will have different ways of viewing the plan.
@michelchaghoury9629
@michelchaghoury9629 Жыл бұрын
@@DatabaseStar can you please make a video on oracle execution plan how to read it and how know and understand about key improvements?
@DatabaseStar
@DatabaseStar Жыл бұрын
Sure, good idea!
@tomservo75
@tomservo75 Жыл бұрын
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?
@DatabaseStar
@DatabaseStar Жыл бұрын
Yeah it's a good visualisation. This was done in MySQL Workbench which is using MySQL. SQL Server Management Studio has a similar visualisation, but it's not quite the same. I plan on creating a video like this using SQL Server so you may find that more useful. Adding multiple columns to an index is helpful in some scenarios. One would be if you have an Order By clause with multiple columns, you may want to add those columns to an index as it may improve the performance of the query.
@alpsavasdev
@alpsavasdev Жыл бұрын
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?
@DatabaseStar
@DatabaseStar Жыл бұрын
Good point. Yes it would increase the cost as it’s run each time. If it runs slower overall compared to the original method than it may not help. Otherwise a permanent table could be another way to improve it where the index is kept.
@danieltsvetkov695
@danieltsvetkov695 Жыл бұрын
Great video! Thanks
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks!
Are SQL joins bad for performance?
8:21
Database Star
Рет қаралды 8 М.
I Tried to Query 10 MILLION Rows in MySQL in 3 Seconds
22:44
Database Star
Рет қаралды 2,4 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 34 МЛН
Colorful Pasta Painting for Fun Times! 🍝 🎨
00:29
La La Learn
Рет қаралды 308 МЛН
Database Design for School Students for an Entire School
18:34
Database Star
Рет қаралды 26 М.
7 Useful SQL Features You Probably Don’t Know
19:41
Database Star
Рет қаралды 4,8 М.
Monitor long running sessions in oracle
7:01
DeltaDBA
Рет қаралды 4 М.
When to Use a Subquery in SQL
8:50
Database Star
Рет қаралды 35 М.
Complex SQL Query: Watch Me Write It
15:10
Database Star
Рет қаралды 7 М.
SQL Indexes - Definition, Examples, and Tips
12:14
Database Star
Рет қаралды 80 М.
Complex SQL Query Breakdown Step By Step
16:52
Database Star
Рет қаралды 16 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 83 М.
40 Advanced Tips for SSMS (To Save You Time)
29:41
Database Star
Рет қаралды 1,2 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26