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
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm

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