Tom Lane-2 wrote > [ shrug... ] The estimated value is the planner's estimate of what would > happen *if you ran the node to completion*, which in practice doesn't > happen because of the LIMIT.
I don't see how a sort node cannot run to completion...raising the thought that the "actual" row count should not be 10 but should equal whatever the input row count size is. I guess there may be some efficient algorithms and/or inputs that make a sort go slower or faster but ultimately the node would have to ensure that every input row has been sorted before it can return control to its parent node. If the parent only cares about the first 10 rows of the now-sorted relation the sort node doesn't know or care. David J. -- View this message in context: http://postgresql.nabble.com/EXPLAIN-ANALYZE-output-weird-for-Top-N-Sort-tp5826922p5826938.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers