Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Measuring query execution time

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
author & internet detective
Posts: 41073
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic