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 > Stored Procedure Slow...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-05, 11:48
dba_udb dba_udb is offline
Registered User
 
Join Date: Mar 2005
Posts: 73
Angry Stored Procedure Slow...

UDB V8.2
OS AIX, Solaris

I am verynew to UDB .One of the stored procedrue is running very slow...
where can i start to improve the performance..

any ideas?
Reply With Quote
  #2 (permalink)  
Old 11-21-05, 11:54
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
see what it is doing.
Reply With Quote
  #3 (permalink)  
Old 11-21-05, 12:36
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
What kind of stored procedure? SQL? C/Java? We need more details.

I think Cougar8000 nailed it in any case.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #4 (permalink)  
Old 11-21-05, 12:57
dba_udb dba_udb is offline
Registered User
 
Join Date: Mar 2005
Posts: 73
Its sql stored procedure...

It is using a cursor...open , close curstor statements and handler statements and a couple of insert statements...
I have checked the tables too ..they have got all the necessary indexes.

It was running fine till a couple of days agao.....offlate it is running slow..
Runstats are running regularly too...
Reply With Quote
  #5 (permalink)  
Old 11-21-05, 13:23
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Are you able to run some of the statements outside of the procedure? See if they're slow first, could just be a statement that needs tuning.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #6 (permalink)  
Old 11-21-05, 14:22
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
What changed in the last couple of days? Have you try running an explaine on the SQL?

Plus, You need to see what the system is doing as a whole. What was added to the box, what other processing is done now.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #7 (permalink)  
Old 11-28-05, 19:08
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If you are using Static SQL Statements in your SP, the associated packages have to be rebound after a RUNSTATS.

HTH

Sathyaran
Reply With Quote
  #8 (permalink)  
Old 11-29-05, 08:58
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Quote:
Originally Posted by dba_udb
Runstats are running regularly too...
Just wondering. How often are you running runstats and why?
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #9 (permalink)  
Old 12-04-05, 09:40
savilak savilak is offline
Registered User
 
Join Date: Feb 2005
Posts: 6
single partioned DB or multi-partitioned?

Are u running it on a single partioned DB or on a multi-partitioned one?
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