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
 
difference between insert and load a table ?

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

New User


Joined: 18 Dec 2006
Posts: 14
Location: bangalore

PostPosted: Fri Jan 12, 2007 1:46 pm    Post subject: difference between insert and load a table ?
Reply with quote

what is the diff between loading a table and inserting values ie a single row to a table?

which one is beneficial?







thanx,
madhusmita
Back to top
View user's profile Send private message

kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Fri Jan 12, 2007 4:53 pm    Post subject: Re: difference between insert and load a table ?
Reply with quote

Hi,

When you know the result is final in the dataset you can load into table.
When you are not sure then it is better to give in the insert where you can roolback.

Load- can be used in batch, so that you can work on someother issues
Insert in Spufi--> can be use it only as a forground execution

Correct me if I am wrong
Back to top
View user's profile Send private message
vkumard

New User


Joined: 13 Dec 2005
Posts: 9

PostPosted: Fri Jan 12, 2007 4:54 pm    Post subject: Re: difference between insert and load a table ?
Reply with quote

INSERT :
INSERT is a SQL statement(DML) which used to a insert a row into table through either Embedded SQL or SPUFI.

LOAD :
LOAD is an DB2 utility which is not an SQL statement to be used in application program.


Based on application the adavantages might vary..

In your application, if you have Static tables (not policy oriented) then most preferable method is LOAD utility. There is no need to write any seperate application pgm or SQL squery.

If you update a table through LOAD utility, your table status will change into CHECK PENDING/COPY PENDING.

Advantages of using INSERT statement is, you can do more validation in application program.

Summary :
1. For adding too many records or similar kind of records in Table use LOAD utility.
2. LOAD utility is much faster than INSERT statement.

If anybody not agree with my points.. pls correct me.
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
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts can we hardcode a value in db2 load c... ram_vizag DB2 2 Wed Feb 28, 2018 11:04 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm

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