[HACKERS] PROPOSAL: geqo improvement

2009-01-04 Thread marcin mank
Hello, List. There are cases when GEQO returns a very bad plan in some rare executions of a query. To decrease likehood of this happening, I propose: When GEQO detects that what it found is in fact a miserable plan it restarts the search. Simple math shows that if the probability of a bad plan

Re: [HACKERS] PROPOSAL: geqo improvement

2009-01-04 Thread Robert Haas
2009/1/4 marcin mank marcin.m...@gmail.com: GEQO would decide that the plan is bad when the calculated cost of the plan would exceed the time spent planning so far a fixed number of times (100 ? a configurable parameter ?) . I think a function infering cost from time spent could be calculated

Re: [HACKERS] PROPOSAL: geqo improvement

2009-01-04 Thread marcin mank
It sounds like you're proposing to compare the time spent planning to the estimated execution time. AFAICS, those things are unrelated, so I'm not sure what you hope to figure out by comparing them. The idea is: If we are to spend a LOT of resources executing the query, we might as well burn