RE: [PHP] SQL Query time?

From: Date: Wed, 02 May 2001 05:05:53 +0000
Subject: RE: [PHP] SQL Query time?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51106@lists.php.net to get a copy of this message
I wonder if using microtime() gives _actual_ time spent for the query while explain gives _processor_ time. Anuradha On Thu, 26 Apr 2001, Maxim Maletsky wrote: > what about microtime() ? > > you can do it your self: > > $start = microtime(); > mysql_query()... > $stop = microtime(); > > $token = round($stop-$start, 3); > echo "Query took $token seconds"; > > I mean this is not as precise as SQL would do itself, but will work > approximately. > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > PHPBeginner.com (Where PHP Begins) > maxim@phpbeginner.com > www.phpbeginner.com > > > > > -----Original Message----- > From: James, Yz [mailto:liljim@btconnect.com] > Sent: Thursday, April 26, 2001 5:17 AM > To: php-general@lists.php.net > Subject: [PHP] SQL Query time? > > > Hi all, > > I have seen a few pages that echo the time it's taken to execute an SQL > query, like "The results in the database were returned in 0.3 seconds." > Anyone know if there's a built in function to display this, and if there is, > what it is? My more-than-useless-ISP seems to have taken an aversion to > allowing me to surf tonight without disconnecting me. > > Thanks. > James. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#51106) next »