Re: [HACKERS] Sort Refinement

2008-03-22 Thread Simon Riggs
On Thu, 2008-03-20 at 22:35 +, Gregory Stark wrote: Simon Riggs [EMAIL PROTECTED] writes: If we assume we use heap sort, then if we *know* that the data is presorted on (a) then we should be able to emit tuples directly that the value of (a) changes and keep emitting them until the

Re: [HACKERS] Sort Refinement

2008-03-22 Thread Simon Riggs
On Thu, 2008-03-20 at 21:34 +, Sam Mason wrote: On Thu, Mar 20, 2008 at 05:17:22PM +, Simon Riggs wrote: Currently, our sort algorithm assumes that its input is unsorted. So if your data is sorted on (a) and you would like it to be sorted on (a,b) then we need to perform the full

Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Simon Riggs
On Thu, 2008-03-20 at 23:07 +, Simon Riggs wrote: Simon, would it be too much to ask that you concentrate on reviewing existing patches during commit fest? Trying to get people to think about random new ideas is about the most direct undermining of the commit-fest concept that I can

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Heikki Linnakangas
Simon Riggs wrote: On Thu, 2008-03-20 at 23:07 +, Simon Riggs wrote: Simon, would it be too much to ask that you concentrate on reviewing existing patches during commit fest? Trying to get people to think about random new ideas is about the most direct undermining of the commit-fest

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Bruce Momjian
Simon Riggs wrote: On Thu, 2008-03-20 at 23:07 +, Simon Riggs wrote: Simon, would it be too much to ask that you concentrate on reviewing existing patches during commit fest? Trying to get people to think about random new ideas is about the most direct undermining of the

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Simon Riggs
On Fri, 2008-03-21 at 08:48 -0400, Bruce Momjian wrote: I don't think that list is complete. The full archive is: http://momjian.us/cgi-bin/pgpatches Sorry, there is no summary. I've reviewed Nikhil's partitioning patch for now. I have some time to contribute, but not much. I

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Andrew Dunstan
Heikki Linnakangas wrote: Simon Riggs wrote: Incidentally, I'm in favour of letting Heikki review his own work because there's a backlog on index changes that appears to be months long and he has a good chance of tackling that. Umm, I don't think there's any patches from me in the queue

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: Umm, I don't think there's any patches from me in the queue that need review. There's some discussion threads related to bitmap indexes, but that's all. We're definitely not going to get bitmap indexes in this commit fest. I think there are

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: There is your CopyReadLineText speedup, but I think there are too many open questions on it, e.g.: ... So I suggest we take it out of the queue for now and kick it back to you. Per my comments just now, the question is whether it's been adequately

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: There is your CopyReadLineText speedup, but I think there are too many open questions on it, e.g.: ... So I suggest we take it out of the queue for now and kick it back to you. Per my comments just now, the question is

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Heikki Linnakangas
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: There is your CopyReadLineText speedup, but I think there are too many open questions on it, e.g.: ... So I suggest we take it out of the queue for now and kick it back to you. Per my comments just now, the question is whether it's

Re: Commit Fest (was Re: [HACKERS] Sort Refinement)

2008-03-21 Thread Andrew Dunstan
Heikki Linnakangas wrote: Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: There is your CopyReadLineText speedup, but I think there are too many open questions on it, e.g.: ... So I suggest we take it out of the queue for now and kick it back to you. Per my comments just now,

[HACKERS] Sort Refinement

2008-03-20 Thread Simon Riggs
Currently, our sort algorithm assumes that its input is unsorted. So if your data is sorted on (a) and you would like it to be sorted on (a,b) then we need to perform the full sort of (a,b). For small sorts this doesn't matter much. For larger sorts the heap sort algorithm will typically result

Re: [HACKERS] Sort Refinement

2008-03-20 Thread Sam Mason
On Thu, Mar 20, 2008 at 05:17:22PM +, Simon Riggs wrote: Currently, our sort algorithm assumes that its input is unsorted. So if your data is sorted on (a) and you would like it to be sorted on (a,b) then we need to perform the full sort of (a,b). For small sorts this doesn't matter

Re: [HACKERS] Sort Refinement

2008-03-20 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Currently, our sort algorithm assumes that its input is unsorted. So if your data is sorted on (a) and you would like it to be sorted on (a,b) then we need to perform the full sort of (a,b). Simon, would it be too much to ask that you concentrate on

Re: [HACKERS] Sort Refinement

2008-03-20 Thread Gregory Stark
Simon Riggs [EMAIL PROTECTED] writes: If we assume we use heap sort, then if we *know* that the data is presorted on (a) then we should be able to emit tuples directly that the value of (a) changes and keep emitting them until the heap is empty, since they will exit the heap in (a,b) order.

Re: [HACKERS] Sort Refinement

2008-03-20 Thread Simon Riggs
On Thu, 2008-03-20 at 18:08 -0400, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Currently, our sort algorithm assumes that its input is unsorted. So if your data is sorted on (a) and you would like it to be sorted on (a,b) then we need to perform the full sort of (a,b). Simon,