on 09-10-2018 8:32 AM
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...
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.