MySQL query execution time


// Below code is for getting Query execution time in MySQL

$currentTime = microtime(true);
mysql_query("SELECT * FROM test_table_name");
$endTime = microtime(true);

$newTime = $endTime – $currentTime; // You can get last total time by subtracting currentTime from endTime.

About these ads

7 thoughts on “MySQL query execution time

  1. As you can see Niall, your program was very provocative, a source of great inspiration, conversation, and a wonderful effort. You must be very proud and are fortunate indeed to be able to pursue such a career, I envy you, and would very much like to join you in such efforts.

  2. It has taken me a long time to discover your website. Finally. This is exactly the information I was looking for.

  3. My wife and i were absolutely more than happy when Michael managed to complete his research because of the ideas he grabbed from your weblog. It’s not at all simplistic to just choose to be offering tips that some others have been trying to sell. We discover we now have the website owner to thank because of that. Most of the illustrations you’ve made, the straightforward web site navigation, the friendships your site give support to create – it’s got all incredible, and it’s making our son in addition to the family recognize that this concept is enjoyable, and that is incredibly serious. Thanks for all the pieces!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s