Number of rows returned by Sort node

From: Vitaliy Garnashevich <vgarnashevich(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Number of rows returned by Sort node
Date: 2018-01-09 15:20:23
Message-ID: 6979dc4e-a7d1-993d-f2a4-bcdaff05106d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

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)?

->  Merge Join  .... (actual time=1977.388..333626.072 rows=725757 loops=1)
      ->  Index Scan using .... (actual time=0.013..312144.441
rows=49176765 loops=1)
      ->  Sort  .... (actual time=1977.363..2274.092 rows=767662 loops=1)
            ->  Hash Left Join  .... (actual time=97.123..1887.956
rows=135627 loops=1)

(full plan attached, PostgreSQL 9.3)

Regards,
Vitaliy

Attachment Content-Type Size
plan.txt text/plain 5.4 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-01-09 15:23:30 Re: Number of rows returned by Sort node
Previous Message Jeff Janes 2018-01-09 12:44:46 Re: Sv: Re: [GENERAL] pg_dump streaming fails - PostgreSQL 9.2