ROWID走索引之嫌疑犯抓獲

來源:互聯網
上載者:User

通過自己做的分區表來分析,發現不走索引,而把原來的表結構改名,建立新表. 分析後發現 走索引了!

難道是分區的 儲存參數? 還是分區達不到個數.

storage
    (
      initial 80K
      minextents 1
      maxextents unlimited
    );

繼續實驗,也不走索引!

對改造的表不斷的減少分區,測試還是走索引,減少不必要的欄位,保留兩個索引,關鍵索引所需要的欄位. 還是走索引.
 

create table t_test_2
(  id         number ,
  name        varchar2(35),
  create_time date
)partition by range (create_time)

create index idx_idname_test2 on t_test_2(id,name);

create table  USER_SUM_DAY_201210
(
  RECDATE      NUMBER(8) not null,
  OPERID       NUMBER(10) default 0 not null,
  CONTENTID    NUMBER(10) default 0 not null,
  PROVCODE     NUMBER(5) default 0 not null,
  CREATETIME   DATE default sysdate not null,
  MODIFYTIME   DATE default sysdate not null
)
partition by range (PROVCODE);

create index IDX_USER_SUM_DAY_201210_N1 on USER_SUM_DAY_201210(RECDATE, OPERID);

唯一區別是 id number 和 recdate number(8) not null, 非空.

  • 1
  • 2
  • 下一頁

相關文章

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.