Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to delete hugh amount of data?

Re: How to delete hugh amount of data?

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: 2000/07/19
Message-ID: <3975A91D.BB0B1519@edcmail.cr.usgs.gov>#1/1

Carsten,

Is there a index on the "mydate" column? If so, you might want to use a hint to suppress the index. Maybe a better solution would be to drop all indexes on that table, delete the data, and then recreate the indexes. Or you might want to try to copy the "wanted" data to a temporary table, truncate the table, and then copy the "wanted" data back into the table. You'll have to experiment to find a solution that gives you the fastest times.

HTH,
Brian

Carsten Jacobs wrote:
>
> Hi,
>
> I want to
> delete from mytable
> where mydate < to_date('2000-07-10 00:00:00','YYYY-MM-DD HH24:MI:SS');
>
> this is about half of the table rows (about 1,200,000).
> This takes a long time. Does anybody know a faster way to do this
> delete?
>
> Unfortunetly the truncate command has no where clause, because I'm sure
> to delete this rows and don't need a rollback.
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Wed Jul 19 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US