Re: [PATCHES] reorder GROUP BY list

2006-03-05 Thread Neil Conway
On Sun, 2006-03-05 at 00:04 -0500, Neil Conway wrote: > Okay, attached is a revised patch that implements this. Applied. -Neil ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index sc

Re: [PATCHES] reorder GROUP BY list

2006-03-04 Thread Neil Conway
On Sat, 2006-03-04 at 21:21 -0500, Tom Lane wrote: > 1. For each ORDER BY item: > 1a. Find a matching GROUP BY item. > (Break out of loop if no match.) > 1b. Add it to the output list with ORDER BY item's ordering op. > 1c. Remove the matched item from the GROUP BY lis

Re: [PATCHES] reorder GROUP BY list

2006-03-04 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Per recent discussion on -hackers, we should sometimes try to reorder > the columns of the grouping clause to avoid redundant sorts. The > optimizer is not currently capable of doing this, so this patch > implements a simple hack in the analysis phase (tran