… : MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT. (Also there can be used pair mysql_real_query / mysql_use_result or mysql_store_result, which are the same). mysqli_query with MYSQLI_STORE_RESULT (used by default) is equal mysql_query, and with MYSQLI_USE_RESULT – is equal to mysql_unbuffered_query. Results: MYSQLI_STORE_RESULT: 97.83s MYSQLI_USE_RESULT…
Post: Accessing Percona XtraDB Cluster nodes in parallel from PHP using MySQL asynchronous queries
…=>$link) { if ($result = $link->reap_async_query()) { $res = $result->fetch_row(); # Handle returned result mysqli_free_result($result); } else die(sprintf(“MySQLi Error: %s”, mysqli_error($link))); $processed++; } } while ($processed < count($all_links)); As conclusion, we see that using…
Post: PHP Large result sets and summary tables.
… to MySQL result set. OK there is “easy” fix for this problem, you can use mysql_unbuffered_query instead and mysqli and PDO have their own way to reach similar behavior. This call users underlying mysql_use_result API call which does not store all result set in memory but instead streams it…
Comment: Database problems in MySQL/PHP Applications
… to beat MySQLi in speed. It is however bad idea to use > mysql_ functions directly as well – I would go for using mysqli object… also can > use pretty much direct path to mysqli extension to performance > critical queries if you need. Nice but using prepare/execute is… the time – yes – I agree. Learning to use query and external caching of result sets is generally a good idea and having…
Post: Are PHP persistent connections evil ?
… new “mysqli” extension, which is probably one of the reasons some people delay migration to this extension. The reason behind using persistent… optimize Web part of configuration. Thousands of concurrent connections usually result from cases when there are many hundreds of apache children…
Comment: HandlerSocket on SSD
… MySQLi based PK lookups in Perl/PHP, I hit an almost identical limit (10,500), and then got failed connects… So using persistent connection objects for both MySQLi and HandlerSocket access methods I achieved 40,000… execute_multi statements. You should then see some pretty fantastic results. Also try executing through a low-latency link if available…
Comment: HandlerSocket on SSD
… MySQLi based PK lookups in Perl/PHP, I hit an almost identical limit (10,500), and then got failed connects… So using persistent connection objects for both MySQLi and HandlerSocket access methods I achieved 40,000… execute_multi statements. You should then see some pretty fantastic results. Also try executing through a low-latency link if available…
Comment: Handling big result sets
…: Initial Time: 73.3s Unbuffered: 59.3s Using MySQLi: 39.46 MySQLi w/o store_result(): 26.44 So it would seem that your…
Comment: Handling big result sets
… on my database and I came up with the following results: mysql_query: Number of rows: 1000000. execution time: 24.53382897377… same for every run. Now here is the kicker: Using the new mysqli and prepared statement based on the code you provided… really like the whole 10 million
(The waiting on the result drove me nuts) Though I have to admit, the first…
Comment: Handling big result sets
When do I need MYSQLI_STORE_RESULT and $stmt->store_result() Is there only a benefit if I receive many rows or are they useful for simple selects with LIMIT 10 or similar? What are the disadvantages? regards

