If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > tuning SAP Sql's - very urgent

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-20-09, 10:03
db2pro db2pro is offline
Banned
 
Join Date: Mar 2009
Posts: 36
tuning SAP Sql's - very urgent

Hi All,
I have a list of SAP sql’s that I need to tune and when I run the db2advis nothings works on those sql’s as they are GUI based. I have run the db2exfmt for all these sql’s. I have the output also but I don’t know how to take things from there. Please if anyone can help me in this it will be a great help. I need to tune all these sql’s ASAP. Please help me.

DB2 Version - v9.1.0.5 fixpack 5

AIX - 5.3

Thanks

Last edited by db2pro; 04-20-09 at 10:06.
Reply With Quote
  #2 (permalink)  
Old 04-20-09, 18:24
db2dummy1 db2dummy1 is offline
Registered User
 
Join Date: Feb 2009
Posts: 114
db2PRO! follow dummy's advice - DO NOT USE DB2ADVIS! EVER!
Start by reading up on DB2 access path selection. And, if that is your starting point, this is not going to happen "ASAP" - guaranteed!
Reply With Quote
  #3 (permalink)  
Old 04-20-09, 23:01
db2raja db2raja is offline
Registered User
 
Join Date: Mar 2009
Posts: 21
Thanks dummy1...So, could you please suggest any good material for DB2 access path selection ..so that I can start reading it ..
Reply With Quote
  #4 (permalink)  
Old 04-20-09, 23:09
db2dummy1 db2dummy1 is offline
Registered User
 
Join Date: Feb 2009
Posts: 114
Reply With Quote
  #5 (permalink)  
Old 04-21-09, 09:45
db2pro db2pro is offline
Banned
 
Join Date: Mar 2009
Posts: 36
Thanks a lot db2dummy1...very useful material
Reply With Quote
  #6 (permalink)  
Old 04-21-09, 09:52
db2dummy1 db2dummy1 is offline
Registered User
 
Join Date: Feb 2009
Posts: 114
YW ... we aim to please!
Reply With Quote
  #7 (permalink)  
Old 04-23-09, 08:38
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by db2dummy1
db2PRO! follow dummy's advice - DO NOT USE DB2ADVIS! EVER!
Care to explain?
Reply With Quote
  #8 (permalink)  
Old 04-23-09, 09:22
db2dummy1 db2dummy1 is offline
Registered User
 
Join Date: Feb 2009
Posts: 114
But of course!

db2advis will recommend indices to optimize those SQL statements presented to it as input. If you submit one SQL statement it will optimize indices for that one SQL - chances are you will get index only access everywhere for that one query. These indices may be absolutely useless for the rest of the workload. In order to have db2advis do proper job (and the jury is still out on how good a job it does), you have to submit the most representative samples of your SQL in one execution - many SQL statements. You have to know what they are or capture them as they are being run. I am yet to find someone who would do a good job at this. Most of the time people send one SQL statement to db2advis, which of course is a waste of time, as explained above, except for that one SQL. My recommendation is to do what db2advis attempts to do, but do it yourself. While you may not have all the SQL that will ever be run on your database, you understand the overall query and update patterns, and your experience and intuition will tell you what indices to define. Unfortunately "experience and intuition" are the two things that db2advis will never have. So, my vote is for basic human intelligence!

BTW, happy birthday to you, Dr!
Reply With Quote
  #9 (permalink)  
Old 04-24-09, 06:53
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by db2dummy1
BTW, happy birthday to you, Dr!
Thank you, I'm enyoing my last working day as a 49-er.

I agree, but when only 1 query is choking you database, the 1st thing I do is to feed that query to db2advis. The output (what's in a name) is an advice. Sometimes I follow it up and sometimes not.
Another thing to unleash db2advis after a system-test and let it swallow the complete package cache! That gives nice indication.

So your advice NEVER to use db2advis... I say: never on your production machine (I saw it bringing down an instance once) but on your test-machine: yeah, why not?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On