User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 374,006 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,860 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 804 | Replies: 2
Reply
Join Date: Mar 2008
Posts: 7
Reputation: krish_kooll is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
krish_kooll krish_kooll is offline Offline
Newbie Poster

query execution time

  #1  
Apr 18th, 2008
how to obtain query execution time?
i need for mysql query in java...
does anyone know
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2008
Posts: 33
Reputation: varmadba is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
varmadba varmadba is offline Offline
Light Poster

Re: query execution time

  #2  
Jun 18th, 2008
if you are using mysql 5.1 versions
then u can query general_log table to get the execution time

i dont think we can do it in Mysql 5.0 or lesser versions

if you got any thing show us some light
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,041
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 227
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: query execution time

  #3  
Jun 18th, 2008
In php, we make use of microtime to find the execution time.
  1. $starttime = microtime();
  2. $query = mysql_query("select * from table");
  3. $endtime = microtime();
Then calculate the difference between $starttime and $endtime. I am sure you can do the same in java as well !
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 10:29 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC