其实说起来很简单,有两张表,
A(a1, a2, a3, a4)
B(b1, b2, b3, b4)
B表大约有30 million记录,A表大概有12万记录
为了加新的速度,我用了下面的script,可是总是出现
ORA-01555: snapshot too old: rollback segment number 1 with name "_SYSSMU1$"
too small
请教大家,这种情况如何改进?包子相赠求解
1. create two indexes for two tables,
create index Ai on A(a1, a2);
create index Bi on B(b1, b2);
2. save the following script as x.sql, and run it,
set SERVEROUTPUT ON
DECLARE
CURSOR v_cursor IS
SELECT a1, a2 FROM A;
total NUMBER :=0;
BEGIN
FOR i IN v_cur