Re: [PERFORM] Wrong plan for subSELECT with GROUP BY

2006-05-15 Thread Simon Riggs
On Fri, 2006-05-12 at 10:05 -0400, Tom Lane wrote: > Antal Attila <[EMAIL PROTECTED]> writes: > > If this is a deficiency of the planner, I'd like to suggest this feature > > into the planner. > > This really falls into the category of "you've got to be kidding". Agreed > There's no way that it

Re: [PERFORM] Wrong plan for subSELECT with GROUP BY

2006-05-12 Thread Jim C. Nasby
If you wrap the LIMIT select into a subquery in the FROM the planner might figure it out... SELECT ... FROM (SELECT blah FROM a LIMIT 10) LEFT JOIN ... Unlike some other databases that will spend huge amounts of time on trying to re-arrange queries and then hope they can effectively c

Re: [PERFORM] Wrong plan for subSELECT with GROUP BY

2006-05-12 Thread Tom Lane
Antal Attila <[EMAIL PROTECTED]> writes: > If this is a deficiency of the planner, I'd like to suggest this feature > into the planner. This really falls into the category of "you've got to be kidding". There's no way that it'd be reasonable for the planner to expend cycles on every query to look