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 

Commit

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


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Wed Sep 22, 2004 9:57 am    Post subject: Commit Reply with quote

I know that I need a COMMIT in a program after updating rows in a table. If I only perform SELECT on a table, is COMMIT necessary or recommended?
Back to top
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Wed Sep 22, 2004 11:00 am    Post subject: Reply with quote

If a large number of selects are performed commit is recommended else not required. thanks
Back to top
View user's profile Send private message
a_seshu
Beginner


Joined: 30 Sep 2004
Posts: 16
Topics: 4
Location: Chennai

PostPosted: Sat Oct 02, 2004 7:38 am    Post subject: Reply with quote

Suresh,

do you have any idea why is that we would be needing a COMMIT even after a large number of selects are performed? I mean i dont understand what might be the need for giving a commit, even when we are doing a pure read.

May be anything like db2 would release all the held resources for reading??? Confused
_________________
I dont think I would ever stop learning. - Seshu.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Mon Oct 04, 2004 6:59 am    Post subject: Reply with quote

DB2 holds ressources (i.e. locks) even during read processes depending on the "isolation level" of the used DB2 packages or DB2 plans.

If you are reading using the isolation level "Cursor Stability", which is a common used value, then the minimal ressources held have nothing to do with the number of selects you are issuing and giving COMMITs is obsolet.

If you, however, use "Repeatable Read", which is the DB2 default unless overridden by the user, then the ressource consumption is significant.

regards
Christian
Back to top
View user's profile Send private message
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