I'm using MySQL with PHP. I want to measure how much 开发者_JAVA技巧memory and other resources MySQL is using when I run a particular query
As far as I'm aware, you cannot do this in PHP. However, if you are afraid that you are consuming too much memory with your queries, you can use mysql_free_result( );
.
$result = ... first query
mysql_free_result( $result ); // Frees memory
$next_result = ... next query
精彩评论