Re: Help:Snapshot too old
Date: Sat, 14 Apr 2001 12:49:34 +0800
Message-ID: <9b8kua$28ic$1_at_news.cz.js.cn>
I don't think use "set transaction" helps. Since this is the error caused by
"select * from B" statement, and the statement itself does not generate
rollback entries. The possible solution should be:
1. decrease the rows involves in the "select * from B" statement. Instead of
that statement, try to refine this using some where conditions.
2. increase the size of each rollback segment(increase the max extents, next
extent value)
3. create more rollback segment.
The later two are system-wide change, so I think the first one may be the
most practical.
"Andrew Simkovsky" <asimkovsky_at_email.msn.com> wrote in message
news:#JX7qnFxAHA.298_at_cpmsnbbsa09...
> Create a huge rollback segment. Then before each iteration of the loop,
put
> in this statement:
>
> SET TRANSACTION USE ROLLBACK SEGMENT rb_name;
>
>
> <u518615722_at_spawnkill.ip-mobilphone.net> wrote in message
>
news:l.987126659.1116729736_at_dialup-63.214.204.229.philadelphia1.level3.net..
> .
> > Our PL/SQL is very simple
> >
> > Declare
> > Cursor A is
> > select * from table B;
> >
> > Begin
> >
> > For C in A loop
> > v_counter=v_counter+1;
> > insert into table D values ....
> > if mod(v_counter,2000)=0 then
> > commit;
> > end if;
> > end loop;
> > end;
> >
> > But we always get error message says
> > snapshot too old. I even tried commit
> > every 5 rows, I still have the same problem.
> > If we try to commit every 20,000 rows, we
> > will have problem until 800,000 rows was
> > inserted.
> >
> > Any suggestions?
> >
> > Thanks
> >
> >
> >
> >
> >
> > --
> > Sent by dbadba62 from hotmail in area com
> > This is a spam protected message. Please answer with reference header.
> > Posted via http://www.usenet-replayer.com/cgi/content/new
>
>
Received on Sat Apr 14 2001 - 06:49:34 CEST