IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Performance issue when replacing Stored procedure call


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Fri Aug 14, 2009 5:22 pm
Reply with quote

Hi Team ,

In one of my DB2 Cobol program I have replaced a Stored procedure call with the Sql query which is used in the called Stored Procedure. Simply to say Instead of calling Stored procedure to execute a query , I am directly executing that query in the same program itself.

This change is implemented in June 2009 and when we see the CPU consumption times of last 6 months(Jan - Jun) and July month, we observed there is lot of CPU consumption in July.

Can some one please let me know what may be the difference in CPU time replacing a stored procedure call with Sql Query.

Below are CPU consumptions for last 7 months.

Average of last six months CPU time : 140,356
July CPU Time : 12,018,046
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Aug 14, 2009 5:32 pm
Reply with quote

it' s hard to believe that a change from stored procedure to inline has caused
a 8500% increase in the CPU consumption

a much better investigation is needed

the best and fastest thing to do would be to run just two test SP and inline for the same data,
it should give a not statistically sound proof but useful enough indicator for the initail performance evaluation review
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 14, 2009 5:38 pm
Reply with quote

Dare I ask the elapsed time differences

because if your stats are actual CPU seconds .....................................
12 million seconds works out at around 130 day icon_eek.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Aug 14, 2009 5:43 pm
Reply with quote

icon_redface.gif
still my advice stands
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Fri Aug 14, 2009 5:46 pm
Reply with quote

Thanks Expat /Enrico ,

This info I got from my junior. Now when I am going throgh the program I can see , there are some Inspect Commands , String Concatenations and a new join query are included in this as part of June changes.

So may be I need to do more analysis where it is going wrong, I guess the replacement Stored proc not alone causing the issue.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Aug 14, 2009 6:28 pm
Reply with quote

Before the changes the CPU consumption was divided between 2 programs.. your calling program and called program ; now its been consolidated into one package .. Did you check the CPU used by your SP before incorporating the SQL into the calling program ? Or is the numbers mentioned above is for the entire subsystem ?
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Fri Aug 14, 2009 6:32 pm
Reply with quote

The numbers mentioned is for entire subsystem, not for individual programs
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Aug 14, 2009 7:19 pm
Reply with quote

So then how do you conclude that your changes have caused a havoc ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts exploiting Z16 performance PL/I & Assembler 2
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top