cancel
Showing results for 
Search instead for 
Did you mean: 

Loading Data into tables from Calculation Views

smanghnani23
Explorer
0 Kudos

Currently i am loading data from calculation views into tables, currently i am following an approach which will delete the existing data from tables and than load the data from views and its not taking much time as i am having less number of records but when i am having records around 100K than it is taking 5 seconds to load the data.

As delete query is also executed, for those 5 seconds there will be no data in the table, so this is not a good approach to load the data.

Can u suggest something which can maintain consistency while loading the data.

Process which i am following is :

Delete from table....

Multiple insert statements.....

Thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

SergioG_TX
Active Contributor
0 Kudos

a recommended approach would be to include a flag.... for example:

IS_VALID = 1; on the existing records before inserting.

set IS_VALID=0; on the new records being inserted; (you will have what seems to be duplicates, however, the flag distinguishes them)

then insert the new records... and once that operation fails...

delete the IS_VALID = 1;

update the IS_VALID = 1 where IS_VALID = 0;

Answers (0)