views:

33

answers:

1

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