Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you predict sql runtime???

Status
Not open for further replies.

bigbalbossa

Programmer
Mar 21, 2002
87
US
Is there a way to predict how long a piece of sql could run??? Seems like you could with Oracle...
 
bigbalbossa,

you can use explain with db2, which will give you a theoretical time, in terms of timerons. This is simply a measure of how the DB2 optimiser has decided to go and get the data you are asking for and how it's going to do it. This can then allow you to further tune your SQL or add indexes etc.

On top of how many reads DB2 has to do you also need to take into account the speed of your disk controllers etc.

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top