Re: explain analyze rows=%.0f
Andrei Lepikhov <lepihov@gmail.com>
From: Andrei Lepikhov <lepihov@gmail.com>
To: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>,
Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>,
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>,
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>,
Alena Rybakina <a.rybakina@postgrespro.ru>
Date: 2025-02-19T15:37:40Z
Lists: pgsql-hackers
On 19/2/2025 15:01, Ilia Evdokimov wrote: > If we want to convey this information more clearly, we should consider a > more explicit approach. For example, instead of using a fractional > value, we could display the minimum and maximum row counts observed > during execution (e.g.,rows=10..20, formatting details could be > discussed). However, in my opinion, this discussion is beyond the scope > of this thread. I think this approach is redundant. Usually, a problem is an unknown number of tuples because, having millions of loops, we produce a small number of tuples, but each tuple costs a lot because of a subplan or something like that. By printing fractional digits (of course, we need to view significant ones, but we already agreed on a couple of digits for now), we may resolve this corner-case problem fully - at least all examples in my experience would be resolved, and I have even maintained a patch for years to manage this. Moreover, it is too simple to implement. I just can't imagine why not to do it right now. -- 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