Re: explain analyze rows=%.0f
Andrei Lepikhov <a.lepikhov@postgrespro.ru>
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Amit Kapila <amit.kapila16@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>
Cc: Peter Geoghegan <pg@bowt.ie>, Robert Haas <robertmhaas@gmail.com>,
Greg Stark <stark@mit.edu>, vignesh C <vignesh21@gmail.com>,
Ibrar Ahmed <ibrar.ahmad@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
Simon Riggs <simon@2ndquadrant.com>,
Ron Mayer <rm_pg@cheapcomplexdevices.com>,
Euler Taveira de Oliveira <euler@timbira.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-11-07T04:20:59Z
Lists: pgsql-hackers
On 22/7/2022 16:47, Amit Kapila wrote: > I feel the discussion has slightly deviated which makes it unclear > whether this patch is required or not? After quick review I want to express my thoughts. At first, We have been waiting for this feature for years. Often clients give an explain to us where we see something like: "rows=0, loops=1000000". Without verbose mode, I can't even understand whether this node produces any rows or not. So, I think this feature is useful for parameterized plans mostly. Also, printing two decimal digits or even three isn't meaningful - sometimes we have a plan where number of loops is about 1E6 or even 1E7, but number of real rows is equal 100 or 1000. To overcome this issue, I see two options: 1. Show the exact number of tuples without division by loops (fair case but invasive and bad for automation tools). 2. Show rows in scientific format like X.XXEXX. I vote for second option. -- regards, Andrey Lepikhov Postgres Professional
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