Mastering Postgres is such a crisp way to learn this subject. With today’s AI tools writing many of the queries via autocomplete it’s vital to have this knowledge to ensure you know what’s actually happening under the hood. My app’s performance improved overnight after learning more about indexing. Aaron’s excitement for the subject makes it really fun to learn whether I’m next to my code editor or on a treadmill run.Peter Ramsing
Shorten dev cycles with branching and zero-downtime schema migrations.
We've looked at the output of several different explain plans so far, but we haven't dived in super deep because it's been out of scope. Good news for you. It's in scope now.
In this hopefully short-ish module, we're gonna look at several different things about explain plans. There are different formats, there are different settings, there are outputs. Many of the node types. We're gonna look at how to read one because they're kind of indented a little bit weird. And learning this stuff and figuring out how to use this data to help you optimize your queries is going to set you so far apart and it's going to put you so much ahead of the rest of your peers.
This is an extremely important thing for you to understand specifically because when you issue a query to a database, you're telling it what to do, you're not telling it how to do it. Inside of the database it has to look at, it has to look at indexes and statistics and the data and it has to figure out, alright, what's my best, what's my best option here? The way that it does that is it calculates what it thinks are the costs. Like if I do it this way, that's gonna cost me this much, but if I do it that way, it's gonna cost me this much.
You may think you understand what it's going to do, but it is always a good idea to run and explain on it and then maybe even later, and explain, analyze if you're having quite a bit of trouble. And we're gonna look at all of that in this module.