pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steinar H. Gunderson <sgunderson@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of ORDER BY
Date: Tue, 05 Dec 2006 13:39:16 -0500
Message-ID: <9446.1165343956@sss.pgh.pa.us> (raw)
In-Reply-To: <20061205181733.GA10309@uio.no>
References: <4575A863.6040504@varianinc.com>
	<7090.1165341726@sss.pgh.pa.us>
	<20061205181733.GA10309@uio.no>

"Steinar H. Gunderson" <sgunderson@bigfoot.com> writes:
> By the way, is the new sorting code any better for platforms that already
> have a decent qsort() (like Linux)?

It seemed better to us.  Linux' qsort() is really mergesort, which is
better sometimes but often worse --- mergesort tends to have a less
CPU-cache-friendly memory access distribution.  Another big problem with
the Linux version is that it pays no attention to sort_mem, but will
enthusiastically allocate lots of additional memory, thereby blowing
whatever cross-backend memory budgeting you might have been doing.

If you care there is quite a lot of discussion in the -hackers and
-performance archives from last spring or so.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <9446.1165343956@sss.pgh.pa.us>
Permalink:  ../9446.1165343956@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9446.1165343956@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sgunderson@bigfoot.com
  Subject: Re: Performance of ORDER BY
  In-Reply-To: <9446.1165343956@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox