Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us