oracle9i - How to delete large data from Oracle 9i DB? -


I have a desk that is 5 GB, now I was trying to delete as below:

Remove from
  to taglename where to_char (spatetime 'yyyy-mm-dd') & lt; '2009-06-01'.  

But it has been running for a long time and there is no response. Meanwhile I tried to check whether someone is blocking it below:

  select l1.sid, 'IS blocking', l2.sid v $ lock l1, v $ lock L2 where l1.block = 1 and l2.request & gt; 0 and l1.id1 = l2.id1 and l1.id2 = l2.id2  

but I could not find any interruptions.

How do I delete it? Big data without problems? 5GB is not a useful measure of the table size. The total number of rows of cases is that of the rows of rows that you have removed as the ratio of total cases. Number. The average length of the line matters.

If the ratio of rows is small to be removed then it may be of your value while creating an index on screetetime which you can leave later It is important that your entire operation takes more time, but the important thing is that the time will be reduced for you to remove the rows. On the other hand, if you want to delete a large part of the rows, select this table from <1> * Make a copy of the table * as * t1_copy * from * to select from where '' screatedate> = to_date ('2009-06-01' , 'Yyyy-mm-dd')

  • Swap the tables using the Rename command.
  • Reapply the barriers, index for the new T1. One more thing to keep in mind is that extinction accounts more UNDO accounts than other transactions because they take more information to rollback. So if your records are long and / or many, then your DBA may need to check the UNDO tablespace (or rollback segments, if you are still using them).

    In the end, have you done something to check that the time is actually going? DELETE statements are just another query, and they can be confronted using the normal pipeline of tuning tricks.


  • Comments

    Popular posts from this blog

    sql - dynamically varied number of conditions in the 'where' statement using LINQ -

    asp.net mvc - Dynamically Generated Ajax.BeginForm -

    Debug on symbian -