【问题标题】:How to define tablespace when creating CTXCAT index创建 CTXCAT 索引时如何定义表空间
【发布时间】:2019-04-05 13:17:36
【问题描述】:

是否可以在创建索引时定义表空间? 如果是这样,语法是什么?我找不到任何参考。

我尝试类似:

CREATE INDEX "X_INDEX" ON "X_TABLE" ("X_COLUMN") TABLESPACE X_3 INDEXTYPE IS "CTXSYS"."CTXCAT"

【问题讨论】:

    标签: sql oracle ddl


    【解决方案1】:

    与只有 1 个段的常规索引不同,域索引创建许多不同的表和索引,每个表和索引都可以位于不同的表空间中。所以you need to specify tablespace settings in the BASIC_STORAGE preference

    这是一个基于该链接的示例。

    begin
    ctx_ddl.create_preference('mystore', 'BASIC_STORAGE');
    ctx_ddl.set_attribute('mystore', 'I_TABLE_CLAUSE',
                            'tablespace foo storage (initial 1K)'); 
    ctx_ddl.set_attribute('mystore', 'K_TABLE_CLAUSE',
                            'tablespace foo storage (initial 1K)'); 
    ctx_ddl.set_attribute('mystore', 'R_TABLE_CLAUSE',
                            'tablespace users storage (initial 1K) lob
                             (data) store as (disable storage in row cache)');
    ctx_ddl.set_attribute('mystore', 'N_TABLE_CLAUSE',
                            'tablespace foo storage (initial 1K)'); 
    ctx_ddl.set_attribute('mystore', 'I_INDEX_CLAUSE',
                            'tablespace foo storage (initial 1K) compress 2');
    ctx_ddl.set_attribute('mystore', 'P_TABLE_CLAUSE',
                            'tablespace foo storage (initial 1K)'); 
    end;
    /
    
    CREATE INDEX "X_INDEX" ON "X_TABLE" ("X_COLUMN") 
        INDEXTYPE IS "CTXSYS"."CTXCAT" PARAMETERS(STORAGE mystore);
    

    【讨论】:

      猜你喜欢
      • 2012-10-06
      • 2020-09-04
      • 1970-01-01
      • 2014-12-13
      • 2011-08-13
      • 1970-01-01
      • 2016-07-18
      • 2018-08-18
      • 2014-03-24
      相关资源
      最近更新 更多