|
- create table A(col1 number(4,0),col2 number(4,0), col4 char(30));
- create table B(col1 number(4,0),col3 number(4,0), name_b char(30));
- create table C(col2 number(4,0),col3 number(4,0), name_c char(30));
- create index inx_col12A on a(col1,col2);
复制代码 上面的是建表语句。然后执行查询:
- select A.col4
- from B, A, C
- where B.col3 = 10
- and A.col1 = B.col1
- and A.col2 = C.col2
- and C.col3 = 5
复制代码 其执行计划为下面的截图:
按照最右最上的原则,我认为应该是对C表的过滤应该先执行。
可是这里却先对B进行了过滤,难道C那个执行计划不是最右最上么?
还有下面截图中
得到去除妨碍判断的索引扫描后的执行计划;为什么索引扫描会妨碍判断呢?
|
|