Postgres Performance Tuning Manual: Indexes

In this post, we look at how to overcome slow queries by analysing them with Explain and Analyze, and using indexes to modify and enhance the query timings. Postgres supports different kinds of indexing on the table for querying faster. Multiple column indexes A multi-column B-Tree index can be used with query conditions that involve any subset of the index’s columns. This index is most efficient when there are constraints on the leading (leftmost) columns. The exact rule is that equality constraints on leading columns, plus any inequality constraints on the first column that does not have an equality constraint, will be used to limit the portion of the index that is scanned. ...

March 26, 2023 · 7 min · Kishan Sharma

Postgres Performance Tuning Manual: Query Plans

Postgres is one of the most widely used open source databases in the world. At GOJEK, a lot of our products depend on Postgres as well. A lot of major companies use Postgres as their main database however when you’re building and operating at scale, the volume of data passing through the pipelines can slow down the most efficient systems. To optimise things in order to enhace performace, we can target the brain of the database whhich is optimizer. Optimizer interprets queries and determines the fastest method of execution. A single query optimization technique can increase database performance drastically. ...

March 26, 2023 · 6 min · Kishan Sharma