Everything in the second query is slightly faster (and heavy emphasis on "slightly") - it could simply be caching at some level. Run each query multiple times and interleave them for better results. However, we are now discussing that a query runs in .017ms versus .033ms. Add some real data and demonstrate something that would trigger a real-world concern. Nobody is going to get excited about microsecond differences. At that level, it's near impossible to distinguish anything due to the overall noise and effects of things out of Postgres' control. In short, not a bug, unless you can demonstrate otherwise. :)