pgsql: If we expect a hash join to be performed in multiple batches,
Log Message:
-----------
If we expect a hash join to be performed in multiple batches, suppress
"physical tlist" optimization on the outer relation (ie, force a projection
step to occur in its scan). This avoids storing useless column values when
the outer relation's tuples are written to temporary batch files.
Modified version of a patch by Michael Henderson and Ramon Lawrence.
Modified Files:
--------------
pgsql/src/backend/nodes:
outfuncs.c (r1.355 -> r1.356)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.355&r2=1.356)
pgsql/src/backend/optimizer/path:
costsize.c (r1.205 -> r1.206)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.205&r2=1.206)
pgsql/src/backend/optimizer/plan:
createplan.c (r1.256 -> r1.257)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.256&r2=1.257)
pgsql/src/backend/optimizer/util:
pathnode.c (r1.150 -> r1.151)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c?r1=1.150&r2=1.151)
pgsql/src/include/nodes:
relation.h (r1.170 -> r1.171)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.170&r2=1.171)
On Thu, 2009-03-26 at 17:15 +0000, Tom Lane wrote:
Log Message:
-----------
If we expect a hash join to be performed in multiple batches, suppress
"physical tlist" optimization on the outer relation (ie, force a projection
step to occur in its scan). This avoids storing useless column values when
the outer relation's tuples are written to temporary batch files.
Can we add "batches=N" to the EXPLAIN output for Hash and/or Hash Join?
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
Simon Riggs <simon@2ndquadrant.com> writes:
Can we add "batches=N" to the EXPLAIN output for Hash and/or Hash Join?
Are you talking about expected batches, or actual batches? If the
former, would it be sufficient to distinguish "1" from "more than 1"?
If so, maybe changing the node title to "Batched Hash" would do.
regards, tom lane
On Thu, 2009-04-02 at 15:49 -0400, Tom Lane wrote:
Simon Riggs <simon@2ndquadrant.com> writes:
Can we add "batches=N" to the EXPLAIN output for Hash and/or Hash Join?
Are you talking about expected batches, or actual batches?
Expected batches for EXPLAIN, both for EXPLAIN ANALYZE.
If the
former, would it be sufficient to distinguish "1" from "more than 1"?
If so, maybe changing the node title to "Batched Hash" would do.
Hmmm, knowing the number of batches is beneficial since it helps you to
calculate the required memory to get best performance.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support