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

Home -> Community -> Usenet -> c.d.o.misc -> Re: large deletions

Re: large deletions

From: <Solomon.Yakobson.B_at_bayer.com>
Date: Fri, 19 Feb 1999 20:56:25 GMT
Message-ID: <7akj5j$a7d$1@nnrp1.dejanews.com>


Use:

BEGIN
  LOOP
    delete from table1 where not_unique_id < 10000 and rownum <= XXXX;     EXIT WHEN SQL%ROWCOUNT < XXXX;
    COMMIT;
  END LOOP;
  COMMIT;
END;
/

where XXXX is number of rows to delete in one pass.

Solomon Yakobson.

In article <36CD683E.4F8081FC_at_quasar.no>,   Erik Ulven <erik_at_quasar.no> wrote:
> This is a multi-part message in MIME format.
> --------------E6659A4B29B37FF632E87550
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hello out there.
>
> I have a problem. We need to delete pretty much data from our
> application. The syntax is simple:
> i.e:
>
> delete from table1 where not_unique_id < 10000;
>
> The rollbac segments goes full, and i dont want to expand the rollback
> segments all the time.
> Is there a way to make oracle commit during this deletion, or another
> good solution? Or do i have to
> delete in intervalls which takes alot of time??
>
> Thanks,
>
> erik
>
> --------------E6659A4B29B37FF632E87550
> Content-Type: text/x-vcard; charset=us-ascii;
> name="erik.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for Erik Ulven
> Content-Disposition: attachment;
> filename="erik.vcf"
>
> begin:vcard
> n:Ulven;Erik
> tel;fax:+47 22 73 08 10
> tel;work:+47 22 73 08 60
> x-mozilla-html:FALSE
> org:A/S Quasar Consultants;Computer departement
> adr:;;;;;;
> version:2.1
> email;internet:erik_at_quasar.no
> title:Systems Developer
> fn:Erik Ulven
> end:vcard
>
> --------------E6659A4B29B37FF632E87550--
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Feb 19 1999 - 14:56:25 CST

Original text of this message

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