Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

query time

 
   Database Forums (Home) -> PHP SQL RSS
Next:  #Error In Sub-Form  
Author Message
Tree*Rat

External


Since: Jul 19, 2008
Posts: 11



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

How can you see how long your queries took?

thx

 >> Stay informed about: query time 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 2) Posted: Tue Oct 07, 2008 1:25 pm
Post subject: Re: query time [Login to view extended thread Info.]
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

 >> Stay informed about: query time 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Mysql_query() only allows one SQL query at a time. Other o.. - In the SQL Sub-query syntax thread I started, I came up with a query that does exactly what I need. It worked perfectly at the SQL interface. However I then discovered that mysql_query() can only take one SQL query at a time. Are there any other..

PHP/MySQL query time - PHP/MySQL query - time taken. MySQL reports how long each query takes, is this available to PHP, because if it is, it's not documented in the book I have, or I don't know what I'm looking for. I would like to play with some LIKE queries, but would lik...

What's your time worth? - Hi all, Eventhough I've never hired out to anyone for anything that I know how to do, I still like knowing what the skills I have are worth in the open market. I'm not a database anything yet, barely a newbie, but I'd still like to know what knowing...

Storing time in MySQL - Hi again all, Just here to pick some more brains. I have some code that gets a date from a MySQL database and does some weird and wonderful calucaltions with it. I wish to store the end result back into the MySQL database. When I try it, using a..

Possible to copy data and update a field at the same time? - I've got a structure where I have a database that I want to merge into another (same format), however, I need to update some fields. Is it possible to do an INSERT and an UPDATE in the same SQL statement without modifying the original data with the..
   Database Forums (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]