I'm using MySQL with PHP. I want to measure how much memory and other resources MySQL is using when I run a particular query
A:
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
Ondrej Slinták
2010-05-26 06:04:08