Re: explain analyze rows=%.0f
Andrei Lepikhov <lepihov@gmail.com>
From: Andrei Lepikhov <lepihov@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>,
Matheus Alcantara <matheusssilv97@gmail.com>,
Guillaume Lelarge <guillaume@lelarge.info>,
Daniel Gustafsson <daniel@yesql.se>, Ibrar Ahmed <ibrar.ahmad@gmail.com>,
"Gregory Stark (as CFM)" <stark.cfm@gmail.com>, Tom Lane
<tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>, Peter Geoghegan <pg@bowt.ie>,
vignesh C <vignesh21@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-02-11T20:19:28Z
Lists: pgsql-hackers
On 12/2/2025 00:41, Robert Haas wrote: > On Tue, Feb 11, 2025 at 12:14 PM Andrei Lepikhov <lepihov@gmail.com> wrote: >> Moreover, switching to a floating-point type for row explanations in >> each parameterised node would provide a more comprehensive view and add >> valuable information about the parameterisation of the node, which may >> not be immediately apparent. > > I agree strongly with all of this. I believe we should just implement > what was agreed here: > > https://www.postgresql.org/message-id/21013.1243618236%40sss.pgh.pa.us > > Let's just display 2 fractional digits when nloops>1, else 0, and call it good. Why are there only two fractional digits? I reviewed the user reports where we identified issues without sufficient data, based on explains only, and typical examples included loop numbers ranging from 1E5 to 1E7 and tuples from 1E2 to 1E5. Therefore, it may make sense to display fractional digits up to two meaningful (non-zero) digits. -- regards, Andrei Lepikhov
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