File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Measuring query execution time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Measuring query execution time" Watch "Measuring query execution time" New topic
Author

Measuring query execution time

Stefan Krompass
Ranch Hand

Joined: Apr 29, 2004
Posts: 75
Hi,

how can I measure the execution time of a query in the database (DB2)? Something like
won't work (IMHO) since network time is included.

Stefan
Chetan Lakshmeshwar
Greenhorn

Joined: Feb 04, 2003
Posts: 8
hi,

You may consider using IronEyeSQl.
Actually it has a wrapper over the jdbc driver you use.
Once configured it listens to all SQL activity on the stipulated port and gives you statistics graphically as well as text based reports.

Do take a look at

http://www.irongrid.com/

Regards,
chetan
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Stefan Krompass:
Hi,

how can I measure the execution time of a query in the database (DB2)? Something like
won't work (IMHO) since network time is included.

Stefan

it's a good start, but as mentioned before a profiler would be the tool of choice for this situation

this post might even be better off in the performance forum, but that would be Bear or Jeanne's call.

Jamie
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30379
    
150

Stefan, You can also turn on database logging and have the database do the work. This is available from db2, Oracle and most other databases.

Jamie, Right now this is still on databases. If this turns into a discussion about profilers, we can move it to the performance forum.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Measuring query execution time