… ? Because by default mysql_query uses mysql_store_result C library call and buffers all result set in the process memory. Not good…() if you use this method but this is told in PHP manual and so easy to catch. There are however more… system anyway. The workaround for this one is to use SQL_BUFFER_RESULT hint if you need to release table locks early. It…
Post: Handling big result sets
… a SQL query query to MySQL, without fetching and buffering the result rows automatically, as mysql_query() does. So mysql_query buffers all rows…slow down things a bit. So script with prepared statements: < ?php $mysqli = new mysqli(“localhost”, “root”, “”, “test”); /* check connection */ if (mysqli…
Post: Read/Write Splitting with PHP Webinar Questions Followup
… on “Read/Write Splitting with PHP” for Percona Webinars. If you missed…from a slave node will return results as current as reads from …prototype to use hints embedded in SQL comments, instead of instantiating different wrapper … the page also resides in the buffer pool and it can serve subsequent …
Post: Shard-Query EC2 images available
…shards (adjust to your number of nodes) php genconfig 20 > shards.ini Running the … command, called pivot_results cd shard-query/ $ ./run_query < queries.sql | tee raw |./pivot_results & [1] 12359 $ …buffer-size=512K read-rnd-buffer-size=1M skip-host-cache skip-name-resolve sort-buffer-size=512K sql…
Post: Impact of the number of idle connections in MySQL
…Innodb settings: innodb_buffer_pool_size=1G innodb_log_file_size=64M innodb_log_buffer_size=8M …100)) echo “Doing $numconn idle connections” php ./make_conn.php $numconn & cat dbt2.sql | mysql -h 10.2.2….idle connections from a third box and the results were the exact same. The conclusion is quite…
Post: Shard-Query adds parallelism to queries
…CPU when aggregating data and fetching rows from the buffer pool, with respect to a single query, but … at the end for the complete SQL. These tests were done using ‘run_query.php‘, which is the example … a config file. It runs the SQL via ShardQuery and it prints the results. Test #1 This set of …

