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

Home -> Community -> Usenet -> c.d.o.server -> Re: large delete

Re: large delete

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 21 Jun 2006 06:48:53 +0200
Message-ID: <jsjh92lgl2039vh60hqf6lv5frsoigbhhf@4ax.com>


On Tue, 20 Jun 2006 16:21:27 -0700, Akimeu <Nospam_at_Email.com> wrote:

>hello,
>
>i have done some looking around for this, but haven't really found a
>solid answer. we have an sp, to which we're passing in a table name,
>after which we execute immediate a delete statement. is there any way
>of committing within this particular delete?
>
>any insights/suggestions are appreciated. thanks.
>
>this is what i was thinking of doing:
>
> loop
> vsql:='delete from '||vschem||'.'||vtablename||
> ' where '||vcol||'='''||vid||''' and rownum <= 10000';
> execute immediate vsql;
> exit when sql%rowcount = 0;
> commit;
> end loop;

do NOT commit every n records. You will be hitting 'snapshot too old' because of this.

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue Jun 20 2006 - 23:48:53 CDT

Original text of this message

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