Allow EXPLAIN to indicate fractional rows.
authorRobert Haas
Fri, 21 Feb 2025 21:10:44 +0000 (16:10 -0500)
committerRobert Haas
Fri, 21 Feb 2025 21:14:13 +0000 (16:14 -0500)
commitddb17e387aa28d61521227377b00f997756b8a27
tree410cf0510abe0bcbfd5678ab62b91cdd79e84025
parent78d3f48895029e2c7c579fc38c07f2a197f85ed9
Allow EXPLAIN to indicate fractional rows.

When nloops > 1, we now display two digits after the decimal point,
rather than none. This is important because what we print is actually
planstate->instrument->ntuples / nloops, and sometimes what you want
to know is planstate->instrument->ntuples. You can estimate that by
multiplying the displayed row count by the displayed nloops value, but
the fact that the displayed value is rounded makes that inexact. It's
still inexact even if we show these two extra decimal places, but less
so. Perhaps we will agree on a way to further improve this output later,
but for now this seems better than doing nothing.

Author: Ibrar Ahmed 
Author: Ilia Evdokimov 
Reviewed-by: David G. Johnston
Reviewed-by: Amit Kapila
Reviewed-by: Vignesh C
Reviewed-by: Greg Stark
Reviewed-by: Naeem Akhter
Reviewed-by: Hamid Akhtar
Reviewed-by: Tom Lane
Reviewed-by: Andrei Lepikhov
Reviewed-by: Guillaume Lelarge
Reviewed-by: Matheus Alcantara
Reviewed-by: Alena Rybakina
Discussion: http://postgr.es/m/603c8f070905281830g2e5419c4xad2946d149e21f9d%40mail.gmail.com
src/backend/commands/explain.c
src/test/regress/expected/explain.out
src/test/regress/expected/memoize.out
src/test/regress/expected/partition_prune.out
src/test/regress/expected/select_parallel.out
src/test/regress/sql/partition_prune.sql