Why is Postgres BETWEEN so slow?
We recently started using PGanalyze, which is amazing. Today I spent some time trying to speed up some of the slowest queries in Tanda. The very slowest had an average run time of 266ms, and was being called hundreds of thousands of times per day.