IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

difference between insert and load a table ?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top