Yes, mysql will cache your same query every time. So what you need is to
just test the microtime before and after your query script.
If you just want to know how about the efficiency about your sql script, you
can use the mysql_command line and explain it.
Otherwise, I think trying to catch the "qu
Try doing an "explain $query" query.
I *think* MySQL might cache the query/results enough that you'd get an
accurate estimate...
You could also turn MySQL Logging on.
Or, rather crudely, time it in PHP:
$query_start_time = microtime();
$result = mysql_query($query);
$query_end_time = microtime(
I did checked both of them and it seems they do not provide such info...
thanks
"Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Hi, Is there any MySQL lib function which can provide time cost for last
>> query?
>>
>
> Maybe...
>
> http://us2.php.net/manual/en/funct
I did checked both of them and it seems they do not provide such info...
thanks
"Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Hi, Is there any MySQL lib function which can provide time cost for last
>> query?
>>
>
> Maybe...
>
> http://us2.php.net/manual/en/fun
Hi, Is there any MySQL lib function which can provide time cost for last
query?
Maybe...
http://us2.php.net/manual/en/function.mysql-info.php
http://us2.php.net/manual/en/function.mysql-stat.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
5 matches
Mail list logo