postgresql/src/include/optimizer
Tom Lane 3e4b3465b6 Improve planner's ability to recognize cases where an IN's RHS is unique.
If the right-hand side of a semijoin is unique, then we can treat it like a
normal join (or another way to say that is: we don't need to explicitly
unique-ify the data before doing it as a normal join).  We were recognizing
such cases when the RHS was a sub-query with appropriate DISTINCT or GROUP
BY decoration, but there's another way: if the RHS is a plain relation with
unique indexes, we can check if any of the indexes prove the output is
unique.  Most of the infrastructure for that was there already in the join
removal code, though I had to rearrange it a bit.  Per reflection about a
recent example in pgsql-performance.
2011-10-26 17:52:29 -04:00
..
clauses.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:39 -04:00
cost.h Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00
geqo.h Make pgbench use erand48() rather than random(). 2011-08-03 16:26:40 -04:00
geqo_copy.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_gene.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_misc.h Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
geqo_mutation.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_pool.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_random.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_recombination.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_selection.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
joininfo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pathnode.h Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00
paths.h Improve planner's ability to recognize cases where an IN's RHS is unique. 2011-10-26 17:52:29 -04:00
placeholder.h Fix nested PlaceHolderVar expressions that appear only in targetlists. 2011-08-09 00:50:07 -04:00
plancat.h Measure the number of all-visible pages for use in index-only scan costing. 2011-10-14 17:23:46 -04:00
planmain.h Rearrange planner to save the whole PlannerInfo (subroot) for a subquery. 2011-09-03 15:36:24 -04:00
planner.h Recognize self-contradictory restriction clauses for non-table relations. 2011-09-24 19:33:16 -04:00
predtest.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
prep.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
restrictinfo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
subselect.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
tlist.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:39 -04:00
var.h Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00