Query Optimization in PostgreSQL - EXPLAIN Basics

Image for post
Image for post

“EXPLAIN is a really nice command that gives you lots of informations but it’s often easy to not know what to do with all this. That’s quite unfortunate because there isn’t much to know in it. That’s what this whole talk is about: get a nice understanding of the informations given by this command, know how to use this information, and fix your queries so that they work faster.”, sayd Guillaume Lelarge.
If you ask yourself: “Why does it take so much time to execute a query? Why are there no indexes?”, you should look at the following articles:
Part 1
Part 2
Part 3
Chances are you’ve heard about EXPLAIN in PostgreSQL. However, there are still many people who have no idea how to use it. Hopefully these articles will help you tackle with this great tool.
All three articles are based on Guillaume Lelarge’s work, so for deeper understanding of the issue, look at the original source:
Understanding EXPLAIN

Written by

Awesome blog focused on databases and Microsoft, .NET and cloud technologies. http://codingsight.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store