Query time
Posted: Thu Mar 15, 2007 12:19 pm
How do you find out how long it takes for a query to run?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
If you're using MySQL from the command line, it displays the time in seconds at the end of the results. What are you trying to do, optimize a query? If you are, I'd suggest that you check into the available tools for optimizing. There are lots of little 'gotchas' that won't necessarily be obvious just from the raw time it takes to run. For example, are there other concurrent users of the database? I'd have to research it myself, but I'm pretty sure there are built-in environment variables that hold the query time of the most recent query.GeXus wrote:How do you find out how long it takes for a query to run?