Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Re: Re: Speeding up the DBI

by diotalevi (Canon)
on Jul 14, 2003 at 19:39 UTC ( #274128=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: Speeding up the DBI
in thread Speeding up the DBI

I had been under the impression that cursors don't work through DBD::Pg. I'm mistaken?

Comment on Re: Re: Re: Speeding up the DBI
Replies are listed 'Best First'.
Re: Re: Re: Re: Speeding up the DBI
by tantarbobus (Hermit) on Jul 14, 2003 at 20:04 UTC
    $dbh->do(q{DECLARE imprecator CURSOR FOR SELECT * FROM tablename}) ; my $number = 10; my $fetch = $dbh->prepare(q{FETCH $number FROM imprecator}); ## ### Fetch first $number * 10 rows. ## while ($fetch->execute()) { Data::Dumper::Dumper($fetch->fetchall_arrayref()); last if $fetch->rows() < $number; }
    Note: The code above has not been tested; it is for illustrative purposes only.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://274128]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-11-27 16:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls