ORA-30009: Not enough memory for CONNECT BY operation

来源:互联网 发布:淘宝食品类目规则 编辑:程序博客网 时间:2024/05/20 09:11

其实这个是sga内存不足,ok,是这样的。但是不要一味的加大内存,先看看你的程序,一定要把内存占用完,直到报错,才提交?


所以可以直接修改提交的频次。 这样把数据存物理盘,就不会出现这样的问题


insert 未提交,就在buffer cache或data file(undo)。


出错前

     declare   v_commit int ;BEGIN  v_commit:=0;    FOR cur IN (      select * from (     select startip,endip,endip-startip as jk,country,province,city,mno   from cfg_globalipseg_0726 where startip<>endip      and startip in (select startip from ml_456)      ) where jk>100000  and jk<=200000                             )    LOOP      BEGIN        insert into cfg_globalipseg_0801_zk_2         select cur.startip +rownum-1 as startip                ,cur.startip +rownum-1 as endip                ,cur.country                  ,cur.province                ,cur.city                ,cur.mno             from dual  connect by level <= cur.jk+1;      v_commit:=v_commit+1;            if mod(v_commit,1000)=0 then        commit;      end if;            END;    END LOOP;    commit;END; 



修改后,不出错

     declare   v_commit int ;BEGIN  v_commit:=0;    FOR cur IN (      select * from (     select startip,endip,endip-startip as jk,country,province,city,mno   from cfg_globalipseg_0726 where startip<>endip      and startip in (select startip from ml_456)      ) where jk>100000  and jk<=200000                             )    LOOP      BEGIN        insert into cfg_globalipseg_0801_zk_2         select cur.startip +rownum-1 as startip                ,cur.startip +rownum-1 as endip                ,cur.country                  ,cur.province                ,cur.city                ,cur.mno             from dual  connect by level <= cur.jk+1;      v_commit:=v_commit+1;            if mod(v_commit,10)=0 then        commit;      end if;            END;    END LOOP;    commit;END; 



--其实就是修改了,commit 频次。

 if mod(v_commit,1000)=0 then        commit;      end if;      

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 华为荣耀手机进水了怎么办开不开机 华为畅享5s变砖怎么办 我的苹果7机身内存满了怎么办 小米5x拆机后屏幕翘边怎么办 苹果手机设备禁止游戏登入怎么办 苹果7plus玩游戏掉频怎么办 孕期牙套子掉了基牙烂掉了怎么办 美团绑定的信用卡过期了怎么办 苹果6s手机开不开机怎么办 换了散热硅胶后还是死机怎么办 华为畅享6s掉啦怎么办 透明塑料壳被太阳晒的发黄怎么办 新买的手机壳有味道怎么办 刚买的手机壳有异味怎么办 bjd 光油把妆蹭掉了一点怎么办 软皮套手机壳如果大了怎么办 苹果手机自带相机拍照会晃屏怎么办 苹果x手机壳拆不下来怎么办 苹果手机5c屏幕没有反应怎么办 玩穿越火线屏幕两边是黑的怎么办? 8g内存只有2g可用怎么办? 三星7e微信分身打不开怎么办? 光猫的网口1不亮怎么办 两年前的发票发现名头有错误怎么办 苹果5s手机通话声音小怎么办 华为全网通手机电信卡打不了怎么办 合约机移动违约不返话费我该怎么办 电信手机卡合约套餐要到期了怎么办 苹果6s联通4g网速慢怎么办 营业厅买到的不是全网通手机怎么办 全网通手机联通卡被禁用怎么办 红米5手机关机充电自动开机怎么办 华为平板怎么解锁密码忘了怎么办 华为荣耀手机开锁密码忘记了怎么办 畅玩7x密码忘了怎么办 过了时的手机没有刷机包怎么办? 刷了个刷机包游戏玩不了了怎么办? 华为麦芒5手机外放声音小怎么办 微信显示存储卡已拔出怎么办 储存卡已拔出微信头像不可用怎么办 智能手机的电话卡取不出来了怎么办