This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Query Execution Time. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Query Execution Time." Watch "Query Execution Time." New topic

Query Execution Time.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Hi List[],
How i can find the execution time of query in jdbc.i.e
IF suppose i fire select * from emp query then how we can find that how much time it takes to get data from table.

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38075
Varies from database to database. In MySQL running from the command line, it says, "Query successful, 874658345983749 lines, 3.01 seconds."

Or something rather like that.
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
But i want to know how we can know the execution time of query.

Is there any code for it to find out the execution time of query.
Please tell me.
gopinathang ganapathy

Joined: Nov 22, 2008
Posts: 4
S.o.p(" starting at : "+timestamp);
S.o.p(" ending at : "+timestamp);
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703

Keep in mind there's no such thing as a static execution time of a query. Query times can vary depending on the data in your system. If you have no data, for example, queries will be fast!

My Blog: Down Home Country Coding with Scott Selikoff
wood burning stoves
subject: Query Execution Time.
Similar Threads
URGENT !!! how do i find query string in prepared stmt ???
How to count the execution time of my select statement?
SQL Server 2005 Express error logs
Fetching nK records in batch from client side?
time of Query Execution in Oracle ?