Nikolay Samokhvalov: #PostgresMarathon 2-013: Why keep your index set lean
postgres.ai·8h
Flag this post

Your API is slowing down. You check your database and find 42 indexes on your users table. Which ones can you safely drop? How much performance are they costing you? Let’s look at what actually happens in Postgres when you have too many indexes.

If you’re a backend or full-stack engineer, you probably don’t want to become an indexing expert — you just want your API fast and stable, without babysitting pg_stat_user_indexes.

Index maintenance includes multiple activities: dropping unused indexes, dropping redundant indexes, and rebuilding indexes on a regular basis to get rid of index bloat (and of course, keeping autovacuum well tuned).

There are many reasons why we need to keep our index set lean, and some of them are tricky.

Why drop unused and redundant indexes[​](#why…

Similar Posts

Loading similar posts...