MySQL Forums
Forum List  »  Perl

Re: Max_allowed_packet problem
Posted by: Rick James
Date: April 07, 2015 06:45PM

> $bsel->execute();

That pulled in _all_ of the rows. Was the table bigger than 1GB?

There is a parameter, mysql_use_result, to have it pull rows from the server incrementally instead of en masse.

http://search.cpan.org/~capttofu/DBD-mysql-4.031/lib/DBD/mysql.pm says

Quote

mysql_use_result forces the driver to use mysql_use_result rather than mysql_store_result. The former is faster and less memory consuming, but tends to block other processes. mysql_store_result is the default due to that fact storing the result is expected behavior with most applications.

Two ways to set it:
$dbh = DBI->connect("DBI:mysql:test;mysql_use_result=1", "root", "");
$dbh->{mysql_use_result} = 1; # enable

Options: ReplyQuote


Subject
Written By
Posted
April 06, 2015 10:06AM
Re: Max_allowed_packet problem
April 07, 2015 06:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.