469,271 Members | 1,113 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Deleting large number of tuples from Oracle 10g Db.

I have one issue in the like I need to delete a large number of (2 million) tuples from a table of 5 million based on some criteria.The criteria(condition) is fetched from one base table,based on the fetched data tuple is deleted.similarly I have to delete from 30 similar tables.

Like "Delete from employees where id IN(select id from empinfo where empinid=100)"

I tried some options
-Writing all the queries in a file and running the script
-Using a cursor (creating a index table) and deleting particular tuple from the table

Both giving me a large response time.

Main concern here is time. I need to delete in very quick time.
So I need a optimised and efficient solution for the issue.

Thanks In Anticipation.
Sep 5 '08 #1
2 3082
You can try using EXIST inplace of IN.

This might give some more performance.

Sep 6 '08 #2
153 100+
for large deletes it can be faster to create a new table of the data you want to keep and rename it rather than deleting the old data.
Sep 10 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Louis LeBlanc | last post: by
57 posts views Thread by Chris Foote | last post: by
24 posts views Thread by Frank Swarbrick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.