Re: [HACKERS] More thoughts on sorting

2009-08-01 Thread PFC
PFC li...@peufeu.com writes: - for short strings (average 12 bytes), sort is CPU-bound in strcoll() - for longer strings (average 120 bytes), sort is even more CPU-bound in strcoll() No news there. If you are limited by the speed of text comparisons, consider using C locale.

Re: [HACKERS] More thoughts on sorting

2009-08-01 Thread Martijn van Oosterhout
On Sat, Aug 01, 2009 at 09:37:11AM +0200, PFC wrote: PFC li...@peufeu.com writes: - for short strings (average 12 bytes), sort is CPU-bound in strcoll() - for longer strings (average 120 bytes), sort is even more CPU-bound in strcoll() No news there. If you are limited by the speed of text

Re: [HACKERS] More thoughts on sorting

2009-08-01 Thread Greg Stark
On Sat, Aug 1, 2009 at 6:17 PM, Martijn van Oosterhoutklep...@svana.org wrote: On Sat, Aug 01, 2009 at 09:37:11AM +0200, PFC wrote:       Actually, I think (see the bottom of my last email) that this would be a good argument for the per-column COLLATE patch... Standard SQL COLLATE support

[HACKERS] More thoughts on sorting

2009-07-31 Thread PFC
There was a thread some time ago about sorting... it kind of died... I did some tests on a desktop (Postgres 8.3.7, kubuntu, Core 2 dual core, 4GB RAM, RAID1 of 2 SATA disks) Quick conclusions : - grabbing the stuff to sort can be IO bound of course (not here) - for short strings (average

Re: [HACKERS] More thoughts on sorting

2009-07-31 Thread Tom Lane
PFC li...@peufeu.com writes: - for short strings (average 12 bytes), sort is CPU-bound in strcoll() - for longer strings (average 120 bytes), sort is even more CPU-bound in strcoll() No news there. If you are limited by the speed of text comparisons, consider using C locale.