Re: explain analyze rows=%.0f

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>, Andrei Lepikhov <lepihov@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-02-24T16:20:53Z
Lists: pgsql-hackers

Attachments

On Fri, Feb 21, 2025 at 10:00 PM Robert Haas <robertmhaas@gmail.com> wrote:
> I guess we could do that, but how about just always displaying two
> decimal places? I feel like you're really worried that people will be
> confused if the row count is not an integer, but I'm not sure anyone
> else has echoed that concern, and I am doubtful that it's really a
> problem. Either people don't understand that the row count is divided
> through by nloops, in which case the decimal places might actually
> give them a clue that they've misunderstood, or they do understand
> that, in which case the decimal places are not confusing. I feel like
> we've gone to a lot of trouble to come up with complex solutions --
> what was actually committed was one of the simpler things proposed --
> but I am still not convinced that the simplest solution isn't for the
> best.

So here's a patch for that. Thoughts?

-- 
Robert Haas
EDB: http://www.enterprisedb.com

Commits

  1. EXPLAIN: Always use two fractional digits for row counts.

  2. Adjust EXPLAIN test case to filter out "Actual Rows" values.

  3. Allow EXPLAIN to indicate fractional rows.

  4. Fix pgbench performance issue induced by commit af35fe501.