2007 Sep 03 3:26 AM
Hello,
I am executing standard SAP progam (RSDDSTAT_DATA_DELETE) that should delete some records from the BW table RSDDSTATAGGR.
DELETE FROM RSDDSTATAGGR WHERE timestamp <= 'xxx'.Although there are only few records (like 30 records) this step takes forever.
What might be root-causes for this?
Your help will be appreciated.
Thank you
Vitaliy
2007 Sep 03 9:06 AM
Hi Vitaliy,
Root Cause: Seems the where claus has timestamp, which is not a key field and it is also a long text field. It's taking time.
Solution: Please do following.
1. Use select query and select records into internal table say ITAB.
2. Sort this ITAB by the key field of the table.
3. use following delete statement.
DELETE RSDDSTATAGGR FROM ITAB.
Hope this will improve performance.
Thank you,
Message was edited by:
Darshan Patel
Hello,
I am executing standard SAP progam (RSDDSTAT_DATA_DELETE) that should delete some records from the BW table RSDDSTATAGGR.
DELETE FROM RSDDSTATAGGR WHERE timestamp <= 'xxx'.Although there are only few records (like 30 records) this step takes forever.
What might be root-causes for this?
Your help will be appreciated.
Thank you
Vitaliy
2007 Sep 03 9:06 AM
Hi Vitaliy,
Root Cause: Seems the where claus has timestamp, which is not a key field and it is also a long text field. It's taking time.
Solution: Please do following.
1. Use select query and select records into internal table say ITAB.
2. Sort this ITAB by the key field of the table.
3. use following delete statement.
DELETE RSDDSTATAGGR FROM ITAB.
Hope this will improve performance.
Thank you,
Message was edited by:
Darshan Patel
2007 Sep 03 9:07 AM
Hi Vitaliy,
Please feel free to send me email for further query.
Darshan
2007 Sep 04 1:27 AM
Hi Vitaliy,
This BW table has the timestamp value in its field STARTTIME.
But this time stamp is in long form.. so if you want to give a condition, say that delete all records which are older than 03.09.2007, then you will need to convert this data and time to long form first..
and then you can use that in the condition..
Thanks and Best Regards,
Vikas Bittera.
2007 Sep 04 7:46 PM
Gentlemen,
Thank you for your replies. Unfortunately it seems I made an error. I debugged the program and it does not stop on DELETE statement, but after it where program goes into infinitive loop when another table - RSDDSTATTREX - is empty.
Sorry for that, but I appreciate your replies.
- Vitaliy
2007 Sep 04 7:47 PM