Skip to Main Content

SQL & PL/SQL

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!

Deleting records from the tables Header & Detail (Cascade Delete)

user11164339Feb 17 2014 — edited Feb 18 2014

Hi All,

I have a table's Header and Detail which has around 7 to 8 million records in each.I am performing a cascade delete on header table so it will remove the child records in detail table.But the delete sql statement is taking long time to delete few records say 1 million records in pl/sql package.It looks like the tables are also getting locked every time we did the delete .Is there any other way to delete the records which has good performance.

Sql Query:

Delete from <header_table> where request_id=<Concurrent request id>

Index created on both header and detail tables on request_id

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2014
Added on Feb 17 2014
4 comments
914 views