EXPLAIN 会输出命中的索引信息吗?

Viewed 20

给表的 TEST_TXT 字段添加了一个倒排索引

ALTER TABLE test_table_index ADD INDEX idx_test_txt(TEST_TXT) USING INVERTED PROPERTIES("parser" = "english");
BUILD INDEX idx_test_txt ON test_table_index;
SHOW BUILD INDEX where TableName = "test_table_index";

EXPLAIN 查看没有找到命中的索引信息

> EXPLAIN SELECT * from test_table_index where TEST_TXT = "CONT0:ADI_SCLK[1]";

PLAN FRAGMENT 0
  OUTPUT EXPRS:
    FILE_ID[#27]
    DUT_INDEX[#28]
    TEST_ID[#29]
    LOT_ID[#30]
    TEST_FLG[#31]
    RESULT[#32]
    TEST_NUM[#33]
    HEAD_NUM[#34]
    SITE_NUM[#35]
    PARM_FLG[#36]
    TEST_TXT[#37]
    ALARM_ID[#38]
    OPT_FLAG[#39]
    RES_SCAL[#40]
    LLM_SCAL[#41]
    HLM_SCAL[#42]
    LO_LIMIT[#43]
    HI_LIMIT[#44]
    UNITS[#45]
    C_RESFMT[#46]
    C_LLMFMT[#47]
    C_HLMFMT[#48]
    LO_SPEC[#49]
    HI_SPEC[#50]
    TR_INDEX[#51]
  PARTITION: UNPARTITIONED

  HAS_COLO_PLAN_NODE: false

  VRESULT SINK
     MYSQL_PROTOCAL

  1:VEXCHANGE
     offset: 0
     distribute expr lists: FILE_ID[#27]

PLAN FRAGMENT 1

  PARTITION: HASH_PARTITIONED: FILE_ID[#0]

  HAS_COLO_PLAN_NODE: false

  STREAM DATA SINK
    EXCHANGE ID: 01
    UNPARTITIONED

  0:VOlapScanNode(152)
     TABLE: industry_data.test_table_index(test_table_index), PREAGGREGATION: ON
     PREDICATES: (TEST_TXT[#10] = 'CONT0:ADI_SCLK[1]') AND (__DORIS_DELETE_SIGN__[#25] = 0)
     partitions=1/1 (test_table_index)
     tablets=5/5, tabletList=2673045,2673047,2673049 ...
     cardinality=65447094, avgRowSize=0.0, numNodes=1
     pushAggOp=NONE
     final projections: FILE_ID[#0], DUT_INDEX[#1], TEST_ID[#2], LOT_ID[#3], TEST_FLG[#4], RESULT[#5], TEST_NUM[#6], HEAD_NUM[#7], SITE_NUM[#8], PARM_FLG[#9], TEST_TXT[#10], ALARM_ID[#11], OPT_FLAG[#12], RES_SCAL[#13], LLM_SCAL[#14], HLM_SCAL[#15], LO_LIMIT[#16], HI_LIMIT[#17], UNITS[#18], C_RESFMT[#19], C_LLMFMT[#20], C_HLMFMT[#21], LO_SPEC[#22], HI_SPEC[#23], TR_INDEX[#24]
     final project output tuple id: 1


Statistics
 planed with unknown column statistics

是需要在 Profile 中才能看到命中的索引?

1 Answers