At 2:55 PM +1000 8/31/01, Jeremy Howard wrote:
>Paul DuBois wrote:
>>  mysql_store_result/mysql_use_result determine whether or not the server
>>  sends all the rows to the client at once, or one at a time as the client
>>  asks for them.  mysql_store_result is therefore more memory intensive
>>  for the client (which must hold the entire result set).
>>  mysql_use_result is less memory intensive for the client, which needs
>>  memory only for one row at a time, but can cause other processes trying
>>  to use the server to block, because the tables from which you're
>>  retrieving rows are read-locked for the duration of the query (that is,
>>  until the client actually fetches the last row).
>>
>For more information see Paul's great book 'MySQL' (New Riders), p257-259.
>If you're not lucky enough to have the book, there's a brief description
>here:
>http://perl.apache.org/guide/databases.html#mysql_use_result_vs_mysql_store

Note that the documentation at this link uses the notation
mysql_store_result() and mysql_use_result(), as though these
things are functions.  They aren't.  They're statement handle
attributes, typically accessed like this:

$sth->{mysql_store_result} = 1 or 0

$sth->{mysql_use_result} = 1 or 0

Reply via email to