This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to count the execution time of my select statement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to count the execution time of my select statement?" Watch "How to count the execution time of my select statement?" New topic
Author

How to count the execution time of my select statement?

lijun wang
Greenhorn

Joined: Jan 20, 2006
Posts: 28
How to count the execution time of my select statement?
Thanks.
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320
If its in query analyzer u can find that at the right bottom side.
If its in java application, capture time before and after statement execution and find the time difference.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 852
Within the next week or so I hope to release a new version of jamon that allows you to monitor a connection and that will automatically track jamon stats (hits/avg/min/max and more) for every query and other aspects of jdbc such as connection times etc. To enable this you will simply have to do the following. Sign up for the jamon release notices at sourcforge (see link below) and you will be notified when it comes out. I will post on this forum again when it is released too.

The code will be as simple as the following to monitor jdbc (Connections/PreparedStatements/Statements/ResultSets etc, sql, and exceptions thrown.)



http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to count the execution time of my select statement?
 
Similar Threads
Committing in intervals
which tools do you use to monitor your application performance?
How do you know number of rows fetched by ResultSet?.
Eclipse - Breakpoint Hit Count
How to count duplicate entries in one column