Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create a job to clean up old data from one table with index on it.

Ken ISep 1 2021 — edited Sep 2 2021

Hi,
I have to create a job to clean up old data from one table.. This job is to delete all records on this table which is older than 10 days. I checked the table in database and found that there is index has been created on that schema.
how should I decide to implement the deletion policy?
Can we delete data with index? how to delete data with index in place?
Please let me know how to delete data older than 10 days?
Data.jpgAlso index created
Index.JPGI'm trying this command to delete data older than 10 days with index on it
delete from ams.scada_iwl_interface where DATETIME < SYSDATE - 10;
Let me know if we have another way to write query?
Please help.
Regards,
ken

Comments
Post Details
Added on Sep 1 2021
3 comments
784 views