如何在创建CTXCAT索引时定义表空间

问题描述 投票:0回答:1

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

我试着像:

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

sql oracle ddl
1个回答
0
投票

与只有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);
© www.soinside.com 2019 - 2024. All rights reserved.