Data and databases · Edition No. 23 · 17 Sep 2026

HypoPG/hypopg

Creates an index that does not really exist, so PostgreSQL can tell you whether a real one would be used.

← Data and databasesRead the whole edition →
04

HypoPG/hypopg

💎 hidden gem

1.7k stars · PostgreSQL licence (read from the LICENSE file: the permissive BSD-style text PostgreSQL itself uses) · 1.4.3 (2026-06-19), read from /releases/latest; the date showed no year and falls in the past, so 2026 · Track this in Scout

Creates an index that does not really exist, so PostgreSQL can tell you whether a real one would be used.

Repo detailsthe review · specs · pros & cons · install

What it is

A PostgreSQL extension. An extension is an add-on installed into the database server itself, and this one is small and adds no background work. You call one function with the text of the index you are thinking about. Nothing is written to disk. From then on, in your session only, the query planner behaves as though the index exists, so EXPLAIN shows you whether it would be chosen and what it would cost.What it is good for. Anyone with a table that has grown past the point where experiments are cheap. The problem it removes is the guess. Instead of building three candidate indexes overnight and measuring, you try twenty in ten minutes and build the one that wins. It completes a chain this radar has been building for a month: pgBadger from Edition 18 finds which queries are slow, pev2 from Edition 20 explains why one of them is slow, and this tells you whether the obvious fix would actually work. Grasppy's data is in PostgreSQL, so this is the one entry today that could make a page faster this week.

Stars1.7k
LicencePostgreSQL licence (read from the LICENSE file: the permissive BSD-style text PostgreSQL itself uses)
Latest1.4.3 (2026-06-19), read from /releases/latest; the date showed no year and falls in the past, so 2026
Good
  • The pretend index costs nothing. Nothing is written, nothing is locked, and other people using the database are not affected.
  • It only exists inside your own session, so you can experiment on the real database without changing it for anybody else.
  • The PostgreSQL licence is as permissive as MIT, and the code is small enough to read in an afternoon.
Watch for
  • It tells you whether the planner would choose the index, not how fast the query would actually run. Those are close, and they are not the same.
  • Installing it means compiling a small extension on the database server, which needs the PostgreSQL development headers. On a managed database you may not be allowed to.
  • It supports plain B-tree indexes best. More unusual index types are partly supported or not at all.
Similar repositories
  • ankane/dexter

    Reads your slow queries and suggests indexes on its own, and it uses HypoPG underneath to test them, so the two are a pair rather than a choice.

    Track this in Scout
  • powa-team/powa

    Collects query statistics over time and draws them in a web page, and it can call HypoPG to test a suggestion from inside that page.

    Track this in Scout
  • dalibo/pev2

    Draws a query plan as a picture and marks where the database guessed the number of rows badly, which is usually how you find out an index is missing.

    Track this in Scout
Install
# On Debian or Ubuntu, with the PostgreSQL apt repository enabled:
sudo apt install postgresql-17-hypopg      # match the number to your version
# Or from source; you need the PostgreSQL header files first:
sudo apt install postgresql-server-dev-17
git clone https://github.com/HypoPG/hypopg.git
cd hypopg
make && sudo make install
Screenshots
HypoPG/hypopg: GitHub preview card

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.