Re: Question on Sort node's actual rows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Victor Yegorov <vyegorov(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question on Sort node's actual rows
Date: 2014-01-23 15:00:03
Message-ID: 11764.1390489203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Victor Yegorov <vyegorov(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Susan Cassidy 2014-01-23 17:37:04 Re: Prepared statements and cursors
Previous Message Andreas Lubensky 2014-01-23 14:31:15 Prepared statements and cursors