Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov
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;

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Nathan Cook
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

RE: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Jon Haworth
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

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Gabe da Silveira
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

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov
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

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread David Robley
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