Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Tell me which takes less CPU time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
harishch_ch

New User


Joined: 07 Jan 2008
Posts: 27
Location: bangalore

PostPosted: Fri Apr 04, 2008 10:33 am    Post subject: Tell me which takes less CPU time
Reply with quote

Hi,

I got 100 records with my query,
Tell me which takes less CPU time?

1) Commiting ( uPdating/Deleting etc) all 100 at a time.

2) Commiting 50 once and 50 then.

Plz give a quick response.

thanks
Hari.
Back to top
View user's profile Send private message

raviprasath_kp
Warnings : 1

New User


Joined: 20 Feb 2005
Posts: 65
Location: chennai

PostPosted: Fri Apr 04, 2008 2:34 pm    Post subject: Reply to: Tell me which takes less CPU time
Reply with quote

may be the first one only
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 04, 2008 7:44 pm    Post subject:
Reply with quote

Hello,

Quote:
Tell me which takes less CPU time?
Issuing a COMMIT should not be based on cpu time. . .

A COMMIT should be issued to support checkpoint/recovery. Your c/r strategy will determine when you should issue a COMMIT - typically after a logical unit of work (LUW).

Doing 1 versus 2 COMMITs would be somewhat difficult to measure as the difference would be slight.
Back to top
View user's profile Send private message
anjani shanker

New User


Joined: 26 Jan 2007
Posts: 37
Location: USA

PostPosted: Fri Apr 04, 2008 8:04 pm    Post subject:
Reply with quote

Committing does increase the run time for pgm to some extent...but keeping the updates waiting for commit means you are increasing the entries in buffer (logfiles) which is a very unefficient way to code.

Its better that u code like update 50 and commit them...rather than update all and then commit all....

I think the first one would that less time of 2 u mentioned...Plz correct me if I am wrong icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 04, 2008 9:04 pm    Post subject:
Reply with quote

Hello,

Quote:
Committing does increase the run time for pgm to some extent...
Why do you think so? It would be helpful if you run a few tests and post your findings.

Quote:
but keeping the updates waiting for commit means you are increasing the entries in buffer (logfiles) which is a very unefficient way to code
Regardless of when you issue COMMITs, the entries will still be in the log files.
Back to top
View user's profile Send private message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: bangalore

PostPosted: Sat Apr 05, 2008 3:01 am    Post subject:
Reply with quote

Probably 100 is not large number so it does not make any difference on 1 commit or 2 commits, but when data is too alrge we better go for 2 commits
Back to top
View user's profile Send private message
harishch_ch

New User


Joined: 07 Jan 2008
Posts: 27
Location: bangalore

PostPosted: Thu Apr 10, 2008 8:55 pm    Post subject: Reply to: Tell me which takes less CPU time
Reply with quote

From the above replies, i understand that commit doesnot make any difference in cpu time , correct me if i am wrog:)
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 10, 2008 9:22 pm    Post subject:
Reply with quote

The number of commits would make a difference in the CPU time, but that should not be the only reason for determining the number or frequency of the commits.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 2 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us