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 > How to hint dynamic query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-09, 15:23
db2itg db2itg is offline
Registered User
 
Join Date: May 2008
Posts: 15
Post How to hint dynamic query

One of our batch job which has a very long query is taking long time to run. As per our DBAs this can not be hinted bcoz this is a dynamic query unless we create a new access module for this query to make it static. ( In our shop we put all the queries under the access module which gets created thru the in house tool called "code wizard" and the cobol code access them thru the unique statement name.) Now the problem is, to create a new view in code wizard needs a lot of approvals and will take long time, we are cancelling this job every day as it get hanged after some run. We need some quick solution for this.

Just wondering, is there any other way we can hint the query to make it efficient. Also, DBA suggessted us some changes in query to make it efficient but none of them worked.

Any pointers would be appreciated. Thanks!
Reply With Quote
  #2 (permalink)  
Old 09-16-09, 20:27
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I would apply the usual tuning techniques: analyzing what the query does on the system level (disk I/O), in the buffer pool, whether it uses indexes or table scans, how many sorts are there - the usual stuff. Then you can rewrite the query, creating indexes, or take any other corrective measures that are all well-known.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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