Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timing sql query

Status
Not open for further replies.

insania

Technical User
Feb 11, 2004
53
IE
Hi, I cant seem to find anything on this subject, but I want to be able to time how long it takes an sql query (whether mysql/postgresql etc.) to run from php. For example time a create database or select * from...

Thanks
 
As part of my development process I print the sql command to the browser that I'm executing. I also print out the mysql_errno() and mysql_error(). This shows me exactly what the MySql Server received and the results were.

I've found that if I copy the sql from the browser and put it in the SQL box for PHPMyAdmin to execute the query. This not only gives me the test results but gives you a time that the execution took.

Hope this helps!

Peace


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top