[Message also posted to: perl.dbi.users]
[EMAIL PROTECTED] (Davide Sacchetti) wrote:
> Dear users,
> I need to fetch data from two different database (A and B).
>
> I wrote a sequential code fetching from A and, after the fetch is
> finished, from B.
> Then I tried to use threads: I splitted the f
be I/O bound due to all
the database work. This would have to be instrumented.
-Will
-Original Message-
From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED]
Sent: 2 December 2008 12:16
To: Davide Sacchetti
Cc: dbi-users@perl.org
Subject: Re: DBI + ithreads performances
On Tue, 2008-12-02
On Tue, 2008-12-02 at 18:01 +0100, Davide Sacchetti wrote:
> I need to fetch data from two different database (A and B).
>
> I wrote a sequential code fetching from A and, after the fetch is
> finished, from B.
> Then I tried to use threads: I splitted the fetches into 2 threads:
> each
> one make
Dear users,
I need to fetch data from two different database (A and B).
I wrote a sequential code fetching from A and, after the fetch is
finished, from B.
Then I tried to use threads: I splitted the fetches into 2 threads: each
one makes its own connection to A or B and fetches his data.
Apparent
http://search.cpan.org/~timb/DBI/DBI.pm#Threads_and_Thread_Safety
Tim.
On Thu, Mar 11, 2004 at 12:05:40PM -0500, Arnold, Hugh wrote:
>
> I want to spin off $sth->execute() & just this statement into a thread, so I
> can perform other tasks while the database is preparing the results of my
> quer
I want to spin off $sth->execute() & just this statement into a thread, so I
can perform other tasks while the database is preparing the results of my
query. Like:
my $sth=$dbh->prepare(...);
my $thread=async{$sth->execute()};
...do other stuff for a while...
$thre