Re: Deletes in Oracle 7

From: Michael Kustermann <MKUSTERM_at_postoffice.worldnet.att.net>
Date: 1996/10/06
Message-ID: <32586C4E.328B_at_postoffice.worldnet.att.net>#1/1


Gary Mazzone wrote:
>
> Help
>
> 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
>
> Thanks for any help.Your where clause is not using the index since your PK is on
badge, then bdate_time.
Two Options:

  1. Create another index based on bdate_time as the leading column.
  2. Use the badge number in the query where clause Regards MRK
Received on Sun Oct 06 1996 - 00:00:00 CEST

Original text of this message