I didn't see the earlier post, but Mysql will select all rows by default,

>From DBD::mysql,

       Note, that most attributes are valid only after a success-
       full execute.  An "undef" value will returned in that
       case. The most important exception is the
       "mysql_use_result" attribute: This 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. (That's why mysql_store_result is
       the default.)

       To set the "mysql_use_result" attribute, use either of the
       following:

         my $sth = $dbh->prepare("QUERY", { "mysql_use_result" => 1});

       or

         my $sth = $dbh->prepare("QUERY");
         $sth->{"mysql_use_result"} = 1;


                                            STH

On 09-Jun-2003 Stephen Clouse wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Mon, Jun 09, 2003 at 02:33:30PM -0700, Jamin Roth wrote:
>> OK running dmesg shows that the OS is out of memory.  When $sth->execute is
>> run are all of the records returned?  That would take out a ton of memory.
> 
> It would not surprise me at all if MySQL was stupid enough to attempt this.
> 
> I initially figured it might be something in the script, but I looked over it
> and I can't say I'd write it any differently.  It shouldn't be hanging on to
> more than one row at a time.
> 
> It likely has nothing to do with file size, either.  The strace you sent shows
> the process reading when it dies.  Does it manage to output anything before it 
> gets terminated?  If not then that (unfortunately) supports the theory that the
> MySQL client is attempting to suck down a ridiculously large number of records 
> (maybe the entire result set) into local memory upon execute.
> 
> To the list: is it possible that the DBD is calculating a ludicrous initial size
> for RowCacheSize?  Does MySQL even support a row cache?  That is my only guess
> here.
> 
> A high-level DBI trace might confirm that.
> 
> - -- 
> Stephen Clouse <[EMAIL PROTECTED]>
> Senior Programmer/DBE, Core Technology Developer
> The IQ Group, Inc. <http://www.theiqgroup.com/>
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE+5QEaA4aoazQ9p2cRAp2ZAKD0wyk0HfmZW0K6f9JpdPPuV0KSzgCg0HWa
> SMSw4L0Oy1pExxP45QSpw04=
> =QjBt
> -----END PGP SIGNATURE-----

----------------------------------
E-Mail: [EMAIL PROTECTED]
Date: 09-Jun-2003
Time: 17:00:58
----------------------------------

Reply via email to