Re: Number of rows returned by Sort node - Mailing list pgsql-general

From Tom Lane
Subject Re: Number of rows returned by Sort node
Date
Msg-id 28041.1515511410@sss.pgh.pa.us
Whole thread Raw
In response to Number of rows returned by Sort node  (Vitaliy Garnashevich <vgarnashevich@gmail.com>)
Responses Re: Number of rows returned by Sort node  (Vitaliy Garnashevich <vgarnashevich@gmail.com>)
List pgsql-general
Vitaliy Garnashevich <vgarnashevich@gmail.com> writes:
> How, according to EXPLAIN ANALYZE, the Sort node could return more rows 
> as output (rows=767662), than it had for input from its child node 
> (rows=135627)?

Unsurprising when it's the inner input of a merge join --- that reflects
the merge join rescanning parts of the inner input.  It has to do that
whenever the outer input has duplicate keys.

            regards, tom lane


pgsql-general by date:

Previous
From: Vitaliy Garnashevich
Date:
Subject: Number of rows returned by Sort node
Next
From: Adrian Klaver
Date:
Subject: Re: Getting started with first user.