-- Tim Bunce <[EMAIL PROTECTED]> on 11/09/01 22:48:07 +0000

> On Fri, Nov 09, 2001 at 11:35:09AM -0500, [EMAIL PROTECTED] wrote:
>> So, if I've got a massively parallel database, and I want to run
>> a batch of queries against it in parallel--let's say five hundred,
>> six at a time, what would be the best way to do that? My first thought
>> was a fork/connect for every query, but that's way too much overhead.
> 
> You could start six subprocesses and feed the queries to them, perhaps via a
> pipe.

Put an array of SQL into shared memory using a shared-safe
tied hash and shift, fork however many procs you like and
have them shift (or pop) the queries off of the list. The
IPC::Sharable or threadsafe array module (or both maybe?)
implement proc-safe updte operations.

--
Steven Lembark                              2930 W. Palmer
Workhorse Computing                      Chicago, IL 60647
                                           +1 800 762 1582

Reply via email to