Optimize Your SQL Queries | Postgres Edition
Вставка
- Опубліковано 1 сер 2024
- Easy way you can analyze and optimize your SQL queries to get the best performance out of them.
Reference: thoughtbot.com/blog/reading-a...
🥹 If you found this helpful, follow me online here:
✍️ Blog / irtizahafiz
👨💻 Website irtizahafiz.com
📲 Instagram / irtiza.hafiz
0:00 Agenda
01:15 Difference between EXPLAIN & EXPLAIN ANALYZE
02:35 How count of returned rows affect performance
04:15 How to monitor index usage
10:30 Aggregation queries using indexes
13:37 Information about JOIN algorithms
18:15 ORDER BY using Index forward and backward
20:56 How to read query plans
22:10 Outro
#database #mysql #postgres
Just wanted to say thanks for this video! This was a great step by step breakdown and analysis.
Thank you for taking the time to leave a comment. Glad you found it useful.
thank you it was very clear
All of your videos are excellent. Thank you for the clear explanations and detailed examples. I hope you continue to create more videos for your channel!
Glad you found it helpful! Cheers!
Hi. Found your channel today and subscribed. Pretty good content here. Keep it up :D
Welcome aboard!
great video thanks a lot!
Glad you liked it!
Near 17:40, I think the volume table doesn’t have only one row. I think it decided to sequentially scan the volume table for each volume.volume_id will then match book.volume_id with each volume.volume_id. And for matching purposes, it is doing index scan as there is an index for book.volume_id. Sorry, I might be wrong. I didn’t understand how DBMS decided which table it will do the sequential scan first? Thanks for your video!
Hi! Thank you for explaining.
The link I have in the description should give you a better understanding of how to read these query plans. I was just trying to explain the tool, rather than go into the details of how to read them.