Re: PROC_IN_ANALYZE stillborn 13 years ago
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
James Coleman <jtc331@gmail.com>,
pgsql-hackers <pgsql-hackers@lists.postgresql.org>,
Simon Riggs <simon@2ndquadrant.com>
Date: 2020-08-07T18:41:41Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > Thinking about it more, there are really two ways to think about an > estimated row count. > On the one hand, if you think of the row count estimate as the number > of rows that are going to pop out of a node, then it's always right to > think of a unique index as limiting the number of occurrences of a > given value to 1. But, if you think of the row count estimate as a way > of estimating the amount of work that the node has to do to produce > that output, then it isn't. The planner intends its row counts to be interpreted in the first way. We do have a rather indirect way of accounting for the cost of scanning dead tuples and such, which is that we scale scanning costs according to the measured physical size of the relation. That works better for I/O costs than it does for CPU costs, but it's not completely useless for the latter. In any case, we'd certainly not want to increase the scan's row count estimate for that, because that would falsely inflate our estimate of how much work upper plan levels have to do. Whatever happens at the scan level, the upper levels aren't going to see those dead tuples. regards, tom lane
Commits
-
Call out vacuum considerations in create index docs
- c285a244f6d3 13.2 landed
- 93c39f987e9c 14.0 landed
- 259b21233032 12.6 landed
-
Document concurrent indexes waiting on each other
- ed9c9b033546 11.11 landed
- d3bd36a63d69 10.16 landed
- b3d33bf598dd 9.6.21 landed
- b2603f16ad75 12.6 landed
- 968a537b432e 9.5.25 landed
- 58ebe967f8a1 14.0 landed
- 3fe0e7c3fa27 13.2 landed
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited
-
Remove PROC_IN_ANALYZE and derived flags
- cea3d5589865 14.0 landed
-
Improve performance of get_actual_variable_range with recently-dead tuples.
- 3ca930fc39cc 11.0 cited