Victor Yegorov <vyegorov@gmail.com> writes:
> I'm looking at a plan: http://explain.depesz.com/s/sPv
> And I have a question. Why in the following snippet `Sort` node
> reports 128818 rows, although
> child node returned only 352?
It's under a mergejoin, which evidently is rescanning its right input
a lot due to duplicate join keys in the left input.
regards, tom lane