PgHero - Duplicate Indexes

Hi, I am using PgHero as monitoring tool for my Django’s PostgreSQL DB. And it reports very big number of duplicate indexes (69). Good example is the auth app:

And I would just ask if this is normal state. Has it some impact on performance? Is possible to make Django more clever to not create redundant indexes? Thank you for your attention :slight_smile:

This is very normal - there’s an index for each way of accessing the table. It’ll slightly hurt your write performance and on-disk size, but not enough that I would worry about it in any way; generally, unless you know you’re going to be write-constrained (which is rare and limited to things like rapid trading), the more indexes the better.

Specifically, here it looks like every foreign key has its own implicit index in a many to many join table, along with one for the (a, b) column pair. I’d say this is quite normal and actually implicit in the FOREIGN KEY statement if I remember right; I’m not even sure how we could easily turn this off.