Limit  (cost=.... rows=20 width=175) (actual time=.... rows=20 loops=1)
   ->  Sort  (cost=.... rows=568733 width=175) (actual time=....
rows=20 loops=1)
         Sort Method: top-N heapsort

The Sort estimate shows 568733 rows, whereas the actual rows are 20.

Both are correct, in a way.

The node feeding the Sort shows an actual of 379114 rows.

If we are looking at rows returned, then the Sort node estimate should say 20
If we are looking at rows processed, then the Sort node should have
actual rows=379114

I think we should say the latter; i,e, the Sort node should report
379114 rows, not 20 rows.

Thoughts?

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to