Re: explain analyze rows=%.0f
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>,
Matthias van de Meent <boekewurm+postgres@gmail.com>,
Andrei Lepikhov <lepihov@gmail.com>,
pgsql-hackers@lists.postgresql.org,
Guillaume Lelarge <guillaume@lelarge.info>,
Matheus Alcantara <matheusssilv97@gmail.com>,
Alena Rybakina <a.rybakina@postgrespro.ru>
Date: 2025-03-31T17:49:55Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > But why isn't it just as valuable to have two decimal places for the > estimate? I theorize that the cases that are really a problem here are > those where the row count estimate is between 0 and 1 per row, and > rounding to an integer loses all precision. Currently, the planner rounds *all* rowcount estimates to integers (cf. clamp_row_est()). Maybe it'd be appropriate to rethink that, but it's not just a matter of changing EXPLAIN's print format. regards, tom lane
Commits
-
EXPLAIN: Always use two fractional digits for row counts.
- 95dbd827f2ed 18.0 landed
-
Adjust EXPLAIN test case to filter out "Actual Rows" values.
- 44cbba9a7f51 18.0 cited
-
Allow EXPLAIN to indicate fractional rows.
- ddb17e387aa2 18.0 landed
-
Fix pgbench performance issue induced by commit af35fe501.
- fb056564ec5b 18.0 cited