如何建立IOT,那些情况适合建立IOT,谢谢~~~

解决方案 »

  1.   

    如果楼主少用简称可能很多人会帮你的。:D索引组织表的创建:
    CREATE TABLE docindex(
    token char(20),
    doc_id NUMBER,
    token_frequency NUMBER,
    token_offsets VARCHAR2(512),
    CONSTRAINT pk_docindex PRIMARY KEY (token, doc_id))
    ORGANIZATION INDEX TABLESPACE ind_tbs;
    必须给索引结构表指定主键。 索引组织表的分区:
    CREATE TABLE docindex(
    token char(20),
    doc_id NUMBER,
    token_frequency NUMBER,
    token_offsets VARCHAR2(512),
    CONSTRAINT pk_docindex PRIMARY KEY (token, doc_id))
    partition by list (doc_ID)
    (
    partition P_0 values (0)
    )
    ORGANIZATION INDEX TABLESPACE ind_tbs;索引组织表的数据按主键排序手段被存储在B-树索引中,除了存储主键列值外还存储非键列的值。普通索引只存储索引列,而索引组织表则存储表的所有列的值。
    索引组织表一般适应于静态表,且查询多以主键列。当表的大部分列当作主键列时,且表相对静态,比较适合创建索引组织表!
      

  2.   

    create table my_iot
    (
      id,
      name,
      constraint   pk_my_iot primary key(id)
    )
    organization index
    nologging tablespace tb_1
    ;或者 CTAS也可以create table my_iot
    (
      id,
      name,
      constraint   pk_my_iot primary key(id)
    )
    organization index
    nologging tablespace tb_1
    as
    select id,name from student
    ;
      

  3.   

    nologging是不是指建表的同时不需写入重做日志??