]> granicus.if.org Git - postgresql/commit
Improve usage of effective_cache_size parameter by assuming that all the
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Sep 2006 22:49:53 +0000 (22:49 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Sep 2006 22:49:53 +0000 (22:49 +0000)
commitb74c5436857cfd71a0f94736f19c9b070b053e24
tree366bedff3f9e7c5735cd9b7635b2566ffc90f0a6
parent45e11d098f7b9c611c47e0f8565f4aa88281c914
Improve usage of effective_cache_size parameter by assuming that all the
tables in the query compete for cache space, not just the one we are
currently costing an indexscan for.  This seems more realistic, and it
definitely will help in examples recently exhibited by Stefan
Kaltenbrunner.  To get the total size of all the tables involved, we must
tweak the handling of 'append relations' a bit --- formerly we looked up
information about the child tables on-the-fly during set_append_rel_pathlist,
but it needs to be done before we start doing any cost estimation, so
push it into the add_base_rels_to_query scan.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/backend/utils/adt/selfuncs.c
src/include/nodes/relation.h
src/include/optimizer/cost.h
src/include/optimizer/plancat.h