I'm doing a large join in mysql, and then acting on the resulting data and writing it to another table. Right now, I'm using the default mysql_store_result, but the $sth->execute() after the query takes about 20 minutes to run. I'm wanting to switch over to mysql_use_result since I'm only acting on one row at a time.
But, this part of the documentation bothers me:
This attribute 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.)
I'm acting on one row at a time, and then storing the result in an array. Every 500 entries, I do an INSERT into a separate table. Would this be OK to do from within the mysql_use_result loop? Would it be OK to do if I define a new DB handler for the INSERTs?