ORA-30009: CONNECT BY 操作記憶體不足,ora-30009connect

來源:互聯網
上載者:User

ORA-30009: CONNECT BY 操作記憶體不足,ora-30009connect

  今天在11g的環境上製造資料碰到ORA-30009: CONNECT BY 操作記憶體不足,10g開始支援XML後,改為xmltable就可以了。

SQL> drop table t_range purge;

SQL> create table t_range (id number not null PRIMARY KEY, test_date date) partition by range (test_date)
    (
    partition p_2014_7 values less than (to_date('2014-08-01', 'yyyy-mm-dd')),
    partition p_2014_8 values less than (to_date('2014-09-01', 'yyyy-mm-dd')),
    partition p_2014_9 values less than (to_date('2014-10-01', 'yyyy-mm-dd')),
    partition p_2014_10 values less than (to_date('2014-11-01', 'yyyy-mm-dd')),
    partition p_2014_11 values less than (to_date('2014-12-01', 'yyyy-mm-dd')),
    partition p_2014_12 values less than (to_date('2015-01-01', 'yyyy-mm-dd')),
    partition p_max values less than (MAXVALUE)
   ) nologging;

SQL> insert /*+append */ into t_range  select rownum,
           to_date(to_char(sysdate - 120, 'J') +
                   trunc(dbms_random.value(0, 120)),
                   'J')
      from dual
    connect by level <= 2000000;
insert /*+append */ into t_range  select rownum,
                         *
第 1 行出現錯誤:
ORA-30009: CONNECT BY 操作記憶體不足
經過時間:  00: 00: 10.28
SQL> rollback;
回退已完成。

SQL> insert /*+append */ into t_range  select rownum,
           to_date(to_char(sysdate - 120, 'J') +
                   trunc(dbms_random.value(0, 120)),
                   'J')
      from xmltable('1 to 2000000');
已建立2000000行。
經過時間:  00: 00: 28.76
SQL> commit;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.