Re: Threaded Sorting - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Threaded Sorting
Date
Msg-id 200210041556.g94FuMf08003@candle.pha.pa.us
Whole thread Raw
In response to Threaded Sorting  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Responses Re: Threaded Sorting  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-hackers
Hans-J�rgen Sch�nig wrote:
> Did anybody think about threaded sorting so far?
> Assume an SMP machine. In the case of building an index or in the case 
> of sorting a lot of data there is just one backend working. Therefore 
> just one CPU is used.
> What about starting a thread for every temporary file being created? 
> This way CREATE INDEX could use many CPUs.
> Maybe this is worth thinking about because it will speed up huge 
> databases and enterprise level computing.

We haven't thought about it yet because there are too many buggy thread
implementations.  We are probably just now getting to a point where we
can consider it.  However, lots of databases have moved to threads for
all sorts of things and ended up with a royal mess of code.  Threads
can only improve things in a few areas of the backend so it would be
nice if we could limit the exposure to threads to those areas;  sorting
could certainly be one of them, but frankly, I think disk I/O is our
limiting factore there.  I would be interested to see some tests that
showed otherwise.

--  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: Greg Copeland
Date:
Subject: Re: Threaded Sorting
Next
From: Bruce Momjian
Date:
Subject: Re: numeric hierarchy again (was Re: floor function in 7.3b2)