On Tue, Feb 19, 2019 at 11:59 PM Abi Noda <a...@abinoda.com> wrote: > Thanks Justin. > > The 4ms different in the examples isn't an accurate benchmark. I'm seeing > about a ~20% difference over a larger sample size. And this is on a fork of > the production database. >
Please show the execution plans from that larger sample, if that is the one that is most relevant. You can "set enable_bitmapscan = off" to get rid of the bitmap scan in order to see the estimated cost and actual performance of the next-best plan (which will probably the regular index scan). Cheers, Jeff