Postgres Explain Explained - How Databases Prepare Optimal Query Plans to Execute SQL
Vložit
- čas přidán 16. 03. 2021
- In This video I'll go through how Explain works in PostgreSQL, explain is the command that you add to the beginning of your SQL to return details about how the database is going to execute the statement.
🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast
🏭 Backend Engineering Videos
backend.husseinnasser.com
💾 Database Engineering Videos
• Database Engineering
🏰 Load Balancing and Proxies Videos
• Proxies
🏛️ Software Archtiecture Videos
• Software Architecture
📩 Messaging Systems
• Message Queues & PubSu...
Become a Member
/ @hnasr
Support me on PayPal
bit.ly/33ENps4
Join our Thriving Backend Community on Discord
/ discord
Stay Awesome,
Hussein - Věda a technologie
Learn the fundamentals of database systems to understand and build performant backend apps
Check out my udemy Introduction to Database Engineering
husseinnasser.com/courses
Thank you! would be great to post an extended version of it with details about planning JOINS and calculations.
excellent video. Although according to the documentation the 'cost' isn't actually milliseconds but 'aribtrary unit of disk fetches'.
Thanks for spotting that!
@@hnasr happy to be of some help.. and really hoping for a more detailed follow up to this video!
This is fantastic, thanks! More on this topic would be wonderful.
Loved this, thanks!!
a video on simple and extended flow in postgreSQL please...
your videos are great, 🔥
Thank you,, any idea why the rows aren’t matching when you do “order by id” and “order by name” ?
Sir can you make a video about graph databases ?
@hnasr Where is the video for the analyze command? Thank you!
Excellent video Hussain as usual. But @3:04 you mentioned that at times you don't need to display the exact count (i.e. Instagram likes) and we should use explain command returned analysis. But how do we do that?
+1
Sure thing! From your client you execute your SQL but add an “Explain (format json) yoursql” and you basically get the stats explain returned to your app. You then parse for the estimated count, returning JSON makes it easy
Here is a video I made on this topic czcams.com/video/8xKS7QQKgzk/video.html
@@hnasr You're the boss! Pretty straightforward. Wait,,, how did I miss your video. :-/
Can you make video about what is the best Distributed database and why that.how effect backend engineers by distributed data base
I watch your videos like I am watching Netflix 😀
The cost is relative based on settings you specify in cfg file. They are arbitrary numbers, you don't care about those numbers as it says I am X relatively to Y, and those costs change from machine to machine.
yeah definitely not milliseconds
Does anybody have a pointer to info on the company that overflowed their primary key as described @7:25? Was that Parler?
I think new video coming soon on instagram down
First view