On Sun, Feb 3, 2019 at 2:45 PM Saul, Jean Paolo <paolo(dot)saul(at)verizonconnect(dot)com> wrote: > The last post was too long. I think I have a much more simpler example that is easier to replicate.
This new example is very similar to examples that I have personally come up with. I have no difficulty explaining why the case with lots of duplicates is slower, so it doesn't really help.
I cannot account for why you can observe a difference across Postgres versions, though -- that's what I'm having difficulty with. Are you sure about that effect? There haven't been any directly relevant changes in this area in many years.