Re: Threaded Sorting - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Threaded Sorting
Date
Msg-id 200210041931.g94JVrJ09334@candle.pha.pa.us
Whole thread Raw
In response to Re: Threaded Sorting  (Greg Copeland <greg@CopelandConsulting.Net>)
Responses Re: Threaded Sorting
List 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@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Threaded Sorting
Next
From: Bruce Momjian
Date:
Subject: Re: Threaded Sorting