"query time" by mysql in php script
is useless as there are many other factors can affect you.
Best regards,
Shiqi Yang
-Original Message-
From: Ahmed Saad [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 12, 2005 11:43 PM
To: php-general@lists.php.net
Subject: [PHP] how t
On 7/11/05, x <[EMAIL PROTECTED]> wrote:
> Since we can see the time cost each time we query MySQL through MySQL
> console (such as 75 rows in set (0.01 sec)), so I am wondering there is
> already an existing function which will return the value...
I think you are confusing two things: mysql serve
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.
Hi, Is there any MySQL lib function which can provide time cost for last
query?
Since we can see the time cost each time we query MySQL through MySQL
console (such as 75 rows in set (0.01 sec)), so I am wondering there is
already an existing function which will return the value...
Thanks
--
PHP
7 matches
Mail list logo