我想在 Oracle 中从几千个点构建形状,但是在运行创建的代码时,我得到了错误:
ORA-06550: 程序太大(代码生成操作数)
我达到了什么极限?我该如何克服它?
重现错误的类似代码(它会在一分钟内运行或失败):
declare
s clob;
begin
s := '
declare
type t_x is table of number index by pls_integer;
x t_x;
varr sdo_ordinate_array;
begin
';
for i in 1..23000 loop --21825: ok, 21850: error
s := s || 'x('||to_char(i)||') := 46.709864 + '||to_char(i)||'/23000;';
end loop;
s := s || '
varr := sdo_ordinate_array();
varr.extend(x.count);
for i in 1 .. x.count loop
varr(i) := x(i);
end loop;
end;';
execute immediate s;
end;