I have the following to open a database:

my $dbh = DBI->connect("DBI:$dbconn", $dbuser, $dbpass) or
        die "Couldn't connect to db $dbconn:" . DBI->errstr;

and then later I'm doing:

        my $query="select user_id, preference from $opt{table}";
        $sth = $dbh->prepare($query);
        print "Executing query\n";
        $sth->execute();
        print "Executed\n";

this query will return (literally) millions of rows. More than can fit into 
memory. When the execute() method is called, it seems to want to put all the 
data into RAM, which causes issues. I've tried playing with 
$dbh->{RowCacheSize}, but it seems to be ignored. I'm using the MySQL driver.

Is this expected behaviour, and what can I do about it?

-- 
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D

Attachment: pgplgAGKQd2tz.pgp
Description: PGP signature

Reply via email to