The Best (Query) Plans of Mice and Men

Or rather, of elephants 🐘 and men. At $work , we use PostgreSQL a lot . So much in fact, that we tend to be paranoid frugal when adding even more stuff to it. In this case, we wanted to add a new index to speed up a query (with an eye-watering p99 latency of several seconds). We have a single, big table that is shared between a few different features, but we are only interested in a tiny subset…