不完整的指数是什么意思

{问题}

When checking all indexes on a table, I can see an index flagged as "不完整". 不完整的指数是什么意思?

{问题}

{回答}

从版本4.0开始,Nuodb支持 在线索引创建。使用该方法创建的索引可以显示在“不完整”状态下。

什么是不完整的指数?

If an index is created using the 创建索引 ... ONLINE command, it is built in multiple stages in a way that allows concurrent updates to the table to proceed without being blocked. The index is first created in the 不完整 state (不完整 appears before the index name in the output of the SHOW TABLE command) and transitions to a fully-functional state once it is fully created and made available for subsequent queries to use.

什么时候可以索引不完整?

在创建时,索引处于“不完整”状态。

如果在线索引创建出于某种原因失败,则索引将仍然存在该状态。无法构建索引的原因包括尝试在表中创建一个唯一的索引,该表包含重复值或索引创建期间te或sm的故障。 

检查不完整的索引

To check for the presence of incomplete indexes in a given table, use the SHOW command:

SQL> select * from system.indexes where flags = & 4 > 0;

 INDEXNAME  TABLENAME  SCHEMA  INDEXTYPE  FIELDCOUNT  INDEXID  FLAGS  HISTOGRAMRESOLUTION                    IDENTIFIER
 ---------- ---------- ------- ---------- ----------- -------- ------ -------------------- -----------------------------------------------

 IDX_ONLINE     T1      USER       2           1        167      4            256          IDX_ONLINE-7c0c7f1d-00b1-2849-f6a6-de96f6331597
 

SQL2> show table t1 Tables named T1 Found table T1 in schema USER Fields: F1 string Incomplete Secondary Index: IDX_ONLINE on field: F1

有关标志列的详细信息,请检查 索引.

 

处理不完整的索引

不完整索引的存在不会影响读取查询,但是,如果违反索引的约束检查,则可以继续更新它,并且可能发生故障,例如,违反唯一的约束违规。

An incomplete index should be dropped manually using DROP INDEX and then recreated using the original 创建索引 ONLINE statement. For more information about 在线索引创建, please check 创建索引.

索引创建是一个内存密集型操作。用户可以使泄漏到磁盘功能使得记忆压力降低。默认情况下,在构建非临时表上的SM引擎上默认启用该功能。有关更多信息,请检查 泄漏到磁盘.

如果您有任何疑问,请点击 这里

{回答}

Have more questions? 提交申请

注释