Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-22 Thread Denes Daniel
Tom Lane <[EMAIL PROTECTED]> wrote: > The point here is that you've repeated the same example N times > without actually making a case that it's interesting to support. We > have to think about the intellectual complexity that would be added > to the planner to support this case, and the cycles t

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Tom Lane
Denes Daniel <[EMAIL PROTECTED]> writes: > Simon Riggs <[EMAIL PROTECTED]> wrote: >> Make the case. **I** want it is not sufficient... > Sorry, I can't understand that... I'm far from perfect in english. The point here is that you've repeated the same example N times without actually making a cas

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Denes Daniel
Simon Riggs <[EMAIL PROTECTED]> wrote: > On Fri, 2007-09-21 at 21:20 +0200, Dániel Dénes wrote: > > > The costs may be different because I've tuned the query planner's > > parameters. > > OK, understood. > > > > Ordering by parent, child is fairly common but the variation you've > > > got here

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Denes Daniel
In reply to Alvaro Herrera: > The best thing to do is paste them in a text file and send it as an > attachment. Okay, it's attached. > Why did you set enable_sort=off? It's not like sorting 9 rows is going > to take any noticeable amount of time anyway. Of course it's no problem for 9 rows, bu

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Alvaro Herrera
Denes Daniel wrote: > I've just inserted some newlines, so it's better to read than when my > email-client wraps the lines automatically. Did not touch the information > itself. But here is the normal output of EXPLAIN ANALYZE: The best thing to do is paste them in a text file and send it as an

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Denes Daniel
Simon Riggs <[EMAIL PROTECTED]> írta: > Ordering by parent, child is fairly common but the variation you've got > here isn't that common. You'd need to make a case considering all the > alternatives; nobody will agree without a balanced case that includes > what is best for everyone. > > Your EXP

Re: [PERFORM] Query planner unaware of possibly best plan

2007-09-21 Thread Simon Riggs
On Fri, 2007-09-21 at 17:36 +0200, Denes Daniel wrote: > Even though I forced the nested loop plan using both indexes (that > returns the rows in the correct order), there is a needless sort step on > the top, consuming half of the time even on such small tables. > Now it's clear why the planner