From Dev.to
Postgres not using your index? It's counting pages, not rows
Slow Postgres, part 1 of 8. The SQL and raw numbers for every test are on GitHub. A Seq Scan reads each page once, in order. An index lookup walks the B-tree and then reads one heap page per TID. You...
