on 2022 Sep 01 1:47 AM
Dear Experts,
Deleting the temporary staging table in ECC for clearing item around 13M data based on open document number using range table with 10000 doc no at a time and then it is extracted to BW.
Tried with full scan parallel option also deletion is very slow at the db level.
DELETE FROM dfkkcibw WHERE opbel IN rt_del_ciopbel
%_HINTS DB6 'FULL(DFKKCIBW) PARALLEL (DFKKCIBW, 4)'.
COMMIT WORK AND WAIT.
Any other efficient way to delete records based on non-key fields ? please suggest .
Thanks,
ABAP dev
Request clarification before answering.
I suppose that what takes the time is a full table scan of your table for each row in rt_del_ciopbel. On average n/2 rows will have to be scanned to find the row to delete. With an index that time will go down drastically. It will of cause take some time (and space) to maintain the index but probably a lot less than scanning for each deletion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was bit cautious to know , How does the secondary index works in case of full deletion of a table on a daily basis, will it automatically build the secondary index at the db level every time when the data is deleted fully and new data is populated ?? apart from secondary index creation for opbel at table, is there any thing to do (considering full table deletion) from db team ..
Did you already look at 1427449 - Performance issue during deletion of item extracts for BW?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes already using the program RFKKOPBWS_DELETE_MARK to do the full deletion everyday. it deletes by comparing key fields i.e less than record number with block size 100000 and it completes less than a minute , the one i m deleting is for applying intermittent filter based on non key for BW extraction .
Hi ABAP Dev
I think you should take a small DB course it will help you going forward. The index can be added in the normal t-codes so you don't need to involve the DB team as such but they may be able to help you with your detailed questions about how a DB works.
-Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ABAP dev
Have you tried to put an index on opbel? It should help.
If you want to clear the table completely a TRUNCATE would be faster but I suppose you have a need to only delete some rows.
Regards
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i have a need to delete certain rows . This is a temporary staging table and it is completely cleared everyday before loading, After loading again next day with full clear item, we are filtering the data in the table using the delete statement above .
considering full deletion on a daily basis, Would it still help for Deletion if a second index opbel is created on the table level , would it not consume additional time for building index etc, everyday. pl. clarify. If there is no impact i wanted to try
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.