【产品名称】oceanbase
【产品版本】3.1.2
【问题描述】为什么explain出来的查询计划跟我hint的要求不一样?
示例:
explain select /*+LEADING(table_0 table_3 table_5 table_6)*/ count(*) from table_0, table_6, table_5, table_3 where table_0.fk_0 = table_6.primaryKey and table_0.fk_1 = table_5.primaryKey and table_0.fk_3 = table_3.primaryKey and table_0.col_0 > 10000 and table_5.col_6 > 10000 and table_6.col_3 > 10000 and table_3.col_2 > 10000;
explain select /*+USE_MERGE(table_0 table_3 table_5 table_6)*/ count(*) from table_0, table_6, table_5, table_3 where table_0.fk_0 = table_6.primaryKey and table_0.fk_1 = table_5.primaryKey and table_0.fk_3 = table_3.primaryKey and table_0.col_0 > 10000 and table_5.col_6 > 10000 and table_6.col_3 > 10000 and table_3.col_2 > 10000;
得到的查询计划和我想要的不一样,请问这是什么原因呢?我的hint语法有问题吗?