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


Reply via email to