View previous topic :: View next topic
|
Author |
Message |
Madhusmita Patnaik
New User
Joined: 18 Dec 2006 Posts: 14 Location: bangalore
|
|
|
|
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 |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
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 |
|
|
vkumard
New User
Joined: 13 Dec 2005 Posts: 9
|
|
|
|
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 |
|
|
|