我正在尝试update
基于条件的5个表的列。表中的行数以百万计
和表空间是一个问题。我已经考虑过以下选项,并想知道哪个选项不会包含表空间问题或
表现明智哪个更好。
p_fetch_limit = 1000;
第
OPEN cur_recs;
LOOP
FETCH cur_recs BULK COLLECT INTO someCounter LIMIT p_fetch_limit;
IF (someCounter.COUNT > 0) THEN
BEGIN
FOR i IN 1 .. someCounter.count
LOOP
UPDATE table1 SET column1 = someDate WHERE column2 = someCounter.idValue and column1 between someDate1 and someDate2;
UPDATE table2 SET column = someDate WHERE column2 = someCounter.idValue and column1 between someDate1 and someDate2;
UPDATE table3 SET column1 = someDate WHERE column2 = someCounter.idValue and column1 between someDate1 and someDate2;
UPDATE table4 SET column1 = someDate WHERE column2 = someCounter.idValue and column1 between someDate1 and someDate2;
END LOOP;
END;
COMMIT;
END IF;
EXIT WHEN cur_recs%NOTFOUND;
END LOOP;
CLOSE cur_recs;
目前,我遇到了以下表空间问题。
Error report:
ORA-01688: unable to extend table mySchema.table1 partition SYS_P3531 by 1024 in tablespace someTableSpace
01688. 00000 - "unable to extend table %s.%s partition %s by %s in tablespace %s"
*Cause: Failed to allocate an extent for table segment in tablespace.
*Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
files to the tablespace indicated.