Hacker News new | ask | show | jobs
by zac23or 817 days ago
>Pg stats are messed up somehow. Try running explain analyze foo

I did

> Postgres doesn’t automatically create indexes

Both fields have indexes (created manually). Postgres is incorrectly choosing the index in order by column, not the index in the where clause.