aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/advanced.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-09-01 18:16:24 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-09-01 18:16:24 -0400
commit6d2c8c0e2afa8cbaf99555a24336e93118fd181e (patch)
treee831b662e5518de84b9112d060dbb8c9d00e8bfe /src/tutorial/advanced.source
parent4da6439bd8553059766011e2a42c6e39df08717f (diff)
downloadpostgresql-6d2c8c0e2afa8cbaf99555a24336e93118fd181e.tar.gz
postgresql-6d2c8c0e2afa8cbaf99555a24336e93118fd181e.zip
Drop cheap-startup-cost paths during add_path() if we don't need them.
We can detect whether the planner top level is going to care at all about cheap startup cost (it will only do so if query_planner's tuple_fraction argument is greater than zero). If it isn't, we might as well discard paths immediately whose only advantage over others is cheap startup cost. This turns out to get rid of quite a lot of paths in complex queries --- I saw planner runtime reduction of more than a third on one large query. Since add_path isn't currently passed the PlannerInfo "root", the easiest way to tell it whether to do this was to add a bool flag to RelOptInfo. That's a bit redundant, since all relations in a given query level will have the same setting. But in the future it's possible that we'd refine the control decision to work on a per-relation basis, so this seems like a good arrangement anyway. Per my suggestion of a few months ago.
Diffstat (limited to 'src/tutorial/advanced.source')
0 files changed, 0 insertions, 0 deletions