MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Performance tuning using Stored proc - CICS trans is slow

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
pdhanvanthar
Beginner


Joined: 26 Jul 2007
Posts: 2
Topics: 1

PostPosted: Wed Aug 29, 2007 12:03 am    Post subject: Performance tuning using Stored proc - CICS trans is slow Reply with quote

hi ,

I have a strange problem may be anyone of you have any idea. My transaction uses stored procedures to build cursors dynamically . This is done to improve the performance of the cics trans. Now what happenes is when I hit the transaction first time it takes much time , but repeated searches takes less time . Any idea of why more time is taken when I use this first time ?
Back to top
View user's profile Send private message
sriramla
Beginner


Joined: 22 Feb 2003
Posts: 74
Topics: 1

PostPosted: Thu Aug 30, 2007 1:39 pm    Post subject: Reply with quote

Dynamic SQL's are usually cached by the database to optimize the performance. When the same query is executed many times the access path that is already determined wil be reused. Note that DB2 just needs the query format (columns in the SELECT clause, conditions in the WHERE Clause etc) to build the path. The exact data is not a major influence there (unless my understanding is incorrect).

When there are too many different dynamic queries executed then the oldest one will be gone from the cache. This means next time when that query is needed, DB2 will start from the scratch to determine the access path.

Hope this explains the situation you have described here.
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Aug 30, 2007 1:44 pm    Post subject: Reply with quote

One more possibility is higher buffer hit ratios. DB2 loads data into the buffers for the first query, and then subsequent queries find the data in the buffers eliminating the need to do the physical reads.
Back to top
View user's profile Send private message
A_programmer
Beginner


Joined: 15 Oct 2007
Posts: 2
Topics: 0
Location: USA

PostPosted: Wed Oct 31, 2007 7:35 am    Post subject: Reply with quote

There is a concept of stay resident for stored procedure. If you provide this option during the Create of the stored procedure, stored procedure always remains in the memory.
_________________
Its not necessary to change. Survival is not mandatory.
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Oct 31, 2007 2:37 pm    Post subject: Reply with quote

Are you certain the stored procedure is what's taking the extra time the 1st time through? I used to experience similar behavior with CICS transactions without any data base involved. The 1st time after a CICS refresh, the program needed to be fetched from the load library. After that, it didn't need fetching. Granted this was many releases ago of CICS, but it's a possibility.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group