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 > Issue with stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-08, 14:01
blackhawk_123 blackhawk_123 is offline
Registered User
 
Join Date: Jul 2008
Posts: 17
Issue with stored procedure

Hi all,

I am trying to execute a stored procedure and it executes until a certain point and stops at a certain query.
(How we know it stucks at a certain query -- we have logging into a table after every query is executed in the stored proc)

When we run the query (which runs slow) by itself it completes in 38 secs.

So anyone have any ideas what could be the issue?

DB2V9 on RHL

Thank you all in advance
Reply With Quote
  #2 (permalink)  
Old 09-26-08, 15:12
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You need to generate an access plan for the Stored procedure and make sure that it is what you are get for the standalone query. If they are different,
then maybe rebinding the package(s) of the SP will fix the issue.

Andy
Reply With Quote
  #3 (permalink)  
Old 09-29-08, 18:53
blackhawk_123 blackhawk_123 is offline
Registered User
 
Join Date: Jul 2008
Posts: 17
Thanks Andy,

You were right the plan was different for both standalone query and the stored procedure.
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