3 ms·
I love this kind of breakdown that not only explains how something works but walks you through the actual mechanics at the code level. Apart from the explanati
by zmmmmm 5y ago
I love this kind of breakdown that not only explains how something works but walks you through the actual mechanics at the code level.
Apart from the explanation itself, it shows how nice the Postgresql code is. It's a joy to read through.
And specifically this topic is great to understand better because I have multiple times encountered queries that chose insane strategies that resulted in ridiculously long query times. Unfortunately the developers of Postgresql really seem to have a "you're holding it wrong" approach to this issue ... yes I know I'm doing something dumb if my query plan is doing that, but it would be really nice if Postgres gave better tools to figure out why so that I can do it better.
The explain plan tells you what plan it created, but it doesn't help you understand why it didn't do the one that you think it should. This is where hints (which Postgresql doesn't support) are so powerful because if I can force it to use the plan I am thinking of and then see what costs it estimated for each operation, I can figure out why it is rejecting it. I would love to know if there are any good tools for this!
- deleted 5y ago[deleted]