|
|
sybperl-l Archive
Up Prev Next
From: "Wechsler, Steven" <Steven dot Wechsler at mtvstaff dot com>
Subject: Running multiple queries simultaneously
Date: Jan 27 2005 9:53PM
Is there a way to do this with Sybperl without fork()ing separate
subprocesses?
I'd like to write a function that can take, say, a list of tables,
databases, or other objects, and perform a T-SQL function against each
(let's use update stats as an example). Since the function going against
each object is not dependent on any other function in the list, I'd like to
be able to run several of these in parallel to be able to take advantage of
SMP or a high performance SAN or what have you; when the first one completed
I'd take the next off the queue and continue until the queue was emptied.
Presumably I could do this with asynch I/O and n (where n is some integer >=
1) DB handles; however, the stumbling block is: if I have messages returned
(as opposed to a result set), how do I know which handle returned the
message without creating a distinct message handler for each handle?
Thanks,
Steve
|