Re: Threaded Sorting

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Copeland <greg(at)copelandconsulting(dot)net>
Cc: Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Threaded Sorting
Date: 2002-10-04 19:31:53
Message-ID: 200210041931.g94JVrJ09334@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Copeland wrote:
-- Start of PGP signed section.
> Well, that's why I was soliciting developer input as to exactly what
> goes on with sorts. From what I seem to be hearing, all sorts result in
> temp files being created and/or used. If that's the case then yes, I
> can understand the fixation. Of course that opens the door for it being
> a horrible implementation. If that's not the case, then parallel sorts
> still seem like a rather obvious route to look into.

We use tape sorts, ala Knuth, meaning we sort in memory as much as
possible, but when there is more data than fits in memory, rather than
swapping, we write to temp files then merge the temp files (aka tapes).

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-04 19:33:09 Re: Threaded Sorting
Previous Message Tom Lane 2002-10-04 19:22:43 Re: Threaded Sorting