* Atri Sharma (atri.j...@gmail.com) wrote: > What I am concerned about is that in this case, the option plans are > competing plans rather than separate plans.
Not sure I follow this thought entirely.. The plans in the plancache are competeing, but separate, plans. > My main concern is that we might be not able to discard plans that we know > that are not optimal early in planning. My understanding is that planner is > aggressive when discarding potential paths. Maintaining them ahead and > storing and returning them might have issues, but that is only my thought. The planner is aggressive at discarding potential paths, but this is all a consideration for how expensive this particular optimization is, not an issue with the approach itself. We certainly don't want an optimization that doubles the time for 100% of queries planned but only saves time in 5% of the cases, but if we can spend an extra 5% of the time required for planning in the 1% of cases where the optimization could possibly happen to save a huge amount of time for those queries, then it's something to consider. We would definitely want to spend as little time as possible checking for this optimization in cases where it isn't possible to use the optimization. Thanks, Stephen
signature.asc
Description: Digital signature