Re: Deletes in Oracle 7

From: Michael Ho <infoage_at_hk.super.net>
Date: 1996/10/07
Message-ID: <32598115.4035_at_hk.super.net>#1/1


Gary Mazzone wrote:
> I am trying to delete about 65000 records from a database running on
> SCO UNix Oracle 7.1. The deletes will go but I have to keep the number
> of records below 20,000 and 14,000 records take about 2:30 hrs. The
> table has a primary key on two fields, badge and bdate_time. I am doing
> the delete wilth the following statement.
>
> delete from mgevents where bdate_time < '1-jan-96'
>
> this is the 65,000 record set. any help is greatly appricated. Please
> replay to mazzogp_at_naesco.com

65,000 records is a not a small number if you try to delete them at the same time.
Especially when your table have indexes, foreign key constraints, foreign key
references or row level trigger. You can try :

  1. Increase Oracle SGA
  2. Write a PL/SQL Loop block for the delete which commit more often
  3. Use truncate table IF POSSIBLE
  4. Drop or disable Indexes, Constraints and Triggers before delete (Recreate or enable after the delete).

Hope it can help.
Michael. Received on Mon Oct 07 1996 - 00:00:00 CEST

Original text of this message