From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve INTERSECT/EXCEPT hashing by realizing that we don't need |
Date: | 2008-08-07 19:35:03 |
Message-ID: | 20080807193503.0AAFD755315@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Improve INTERSECT/EXCEPT hashing by realizing that we don't need to make any
hashtable entries for tuples that are found only in the second input: they
can never contribute to the output. Furthermore, this implies that the
planner should endeavor to put first the smaller (in number of groups) input
relation for an INTERSECT. Implement that, and upgrade prepunion's estimation
of the number of rows returned by setops so that there's some amount of sanity
in the estimate of which one is smaller.
Modified Files:
--------------
pgsql/src/backend/executor:
nodeSetOp.c (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeSetOp.c?r1=1.26&r2=1.27)
pgsql/src/backend/nodes:
copyfuncs.c (r1.398 -> r1.399)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.398&r2=1.399)
outfuncs.c (r1.332 -> r1.333)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.332&r2=1.333)
pgsql/src/backend/optimizer/plan:
createplan.c (r1.243 -> r1.244)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.243&r2=1.244)
pgsql/src/backend/optimizer/prep:
prepunion.c (r1.151 -> r1.152)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.151&r2=1.152)
pgsql/src/backend/optimizer/util:
tlist.c (r1.80 -> r1.81)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/tlist.c?r1=1.80&r2=1.81)
pgsql/src/include/nodes:
plannodes.h (r1.101 -> r1.102)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/plannodes.h?r1=1.101&r2=1.102)
pgsql/src/include/optimizer:
planmain.h (r1.109 -> r1.110)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/planmain.h?r1=1.109&r2=1.110)
tlist.h (r1.51 -> r1.52)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/tlist.h?r1=1.51&r2=1.52)
From | Date | Subject | |
---|---|---|---|
Next Message | User Dim | 2008-08-07 22:49:22 | pgloader - pgloader: Preliminary support for real line numbers usage in |
Previous Message | Tom Lane | 2008-08-07 03:04:04 | pgsql: Support hashing for duplicate-elimination in INTERSECT and EXCEPT |