Re: Threaded Sorting

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: hs(at)cybertec(dot)at
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Threaded Sorting
Date: 2002-10-04 15:56:22
Message-ID: 200210041556.g94FuMf08003@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hans-Jrgen Schnig 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(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 Manfred Koizar 2002-10-04 16:00:53 Re: Return of INSTEAD rules
Previous Message Bruce Momjian 2002-10-04 15:49:31 Re: Return of INSTEAD rules