Loose index scan is made for this <a href="https://dev.mysql.com/doc/refman/8.0/en/group-by-optimization.html#loose-index-scan" rel="nofollow">https://dev.mysql.com/doc/refman/8.0/en/group-by-optimizatio...
Postgres doesn't have it yet <a href="https://wiki.postgresql.org/wiki/Loose_indexscan" rel="nofollow">https://wiki.postgresql.org/wiki/Loose_indexscan
I haven't followed the latest Postgres releases, but I thought it would be added by now - Timescale/Tigerdata have already implemented a similar index scan in Postgres: <a href="https://www.tigerdata.com/blog/how-we-made-distinct-queries-up-to-8000x-faster-on-postgresql" rel="nofollow">https://www.tigerdata.com/blog/how-we-made-distinct-queries-....
nattaylor · · focus · HN ↗
Postgres doesn't have it yet <a href="https://wiki.postgresql.org/wiki/Loose_indexscan" rel="nofollow">https://wiki.postgresql.org/wiki/Loose_indexscan
nikolatt · · focus · HN ↗