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 shel
endtime-$this->starttime;
I've copied that from a class member 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" &l
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
> 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
> g
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 id
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->
6 matches
Mail list logo