View previous topic :: View next topic
|
Author |
Message |
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Dare I ask the elapsed time differences
because if your stats are actual CPU seconds .....................................
12 million seconds works out at around 130 day |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
still my advice stands |
|
Back to top |
|
|
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
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 |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
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 |
|
|
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
The numbers mentioned is for entire subsystem, not for individual programs |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
So then how do you conclude that your changes have caused a havoc ? |
|
Back to top |
|
|
|