Great PHP tip from the Twin Cities PHP mailing List: mysql_unbuffered_query() can be a big help when you're pulling massive result sets from MySQL. With mysql_unbuffered_query(), you can query the server and begin processing the results without the intermediate step of loading them into memory first.
This is great for things like copying to a file or displaying huge result sets. You'll gain performance improvements and reduce memory consumption! But its not for every query - you'll tie up the MySQL server through the duration of the query processing and you can't run any further queries until you're finished.
For more, see http://www.php.net/manual/en/function.mysql-unbuffered-query.php
Posted by: Allie Micka pajunas interactive, inc. http://pajunas.com
3:31:02 PM
|