Home > Database > Mysql Tutorial > ROWID走索引之嫌疑犯抓获

ROWID走索引之嫌疑犯抓获

WBOY
Release: 2016-06-07 17:14:24
Original
1044 people have browsed it

通过自己做的分区表来分析,发现不走索引,而把原来的表结构改名,创建新表. 分析后发现 走索引了! 难道是分区的 储存参数? 还是分区

通过自己做的分区表来分析,发现不走索引,而把原来的表结构改名,创建新表. 分析后发现 走索引了!

难道是分区的 储存参数? 还是分区达不到个数.

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, 非空.

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template