SearchSearch   

query time

 
   Webmaster Forums (Home) -> PHP MySQL RSS
Next:  cookie deletion upon logging off in php  
Author Message
Tree*Rat

External


Since: Oct 07, 2008
Posts: 1



(Msg. 1) Posted: Tue Oct 07, 2008 4:13 pm
Post subject: query time
Archived from groups: alt>php>sql (more info?)

How can you see how long your queries took?

thx
Back to top
J.O. Aho

External


Since: May 31, 2006
Posts: 2034



(Msg. 2) Posted: Tue Oct 07, 2008 7:06 pm
Post subject: Re: query time
Archived from groups: per prev. post (more info?)

Tree*Rat wrote:
> How can you see how long your queries took?

$start = microtime();
$res = mysqli_query($sq);
$end = microtime();

echo "your query took ".($end-$start)." microseconds";

--

//Aho
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> PHP MySQL
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum