Use microtime before and after the query.
$this-starttime=explode(' ',microtime());
// query()
$this-endtime=explode(' ',microtime());
$this-starttime=$this-starttime[1]+$this-starttime[0];
$this-endtime=$this-endtime[1]+$this-endtime[0];
$this-parse_time=$this-endtime-$this-starttime;
IMO, you are better off printing microtime
[http://www.php.net/manual/en/function.microtime.php] before and after the
query, and after you loop through it. This will give you a better idea of where
the hangups may be. You may also want to sprinkle mircotimes throughout your
code to get a good
I was looking thru the mysql functions, and there doesn't seem to be one
that gives you the amount of time a query takes. Is there anyway to get
this information (since it gives it to you when you type queries
directly into the mysql shell client)? A script of mine is starting to
get
Thank you Andrey Nathan. THat was probably going to be the next thing
to research. I think I figured out why my code got slow though. I have
a preg search of a large field with .* in it at the beginning of an
if,elseif,elseif,elseif struct that I should move to the end of it.
In article
but the idea is clear;
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
- Original Message -
From: Nathan Cook [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Gabe da Silveira [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 7:57 PM
Subject: Re: [PHP] Getting MySQL Query Times.
IMO
On Fri, 24 Aug 2001 01:52, Gabe da Silveira wrote:
I was looking thru the mysql functions, and there doesn't seem to be
one that gives you the amount of time a query takes. Is there anyway
to get this information (since it gives it to you when you type queries
directly into the mysql shell
6 matches
Mail list logo