In response to Lefteris : > Hi Arjen, > > so I understand from all of you that you don't consider the use of 25k > for sorting to be the cause of the slowdown? Probably I am missing > something on the specific sort algorithm used by PG. My RAM does fill > up, mainly by file buffers from linux, but postgres process remains to > 0.1% consumption of main memory. There is no way to force sort to use > say blocks of 128MB ? wouldn't that make a difference? The result-table fits in that piece of memory. You have only this little table: [ 5, 7509643 ] [ 1, 7478969 ] [ 4, 7453687 ] [ 3, 7412939 ] [ 2, 7370368 ] [ 7, 7095198 ] [ 6, 6425690 ] Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance