About me:Oracle ACE pro,optimistic,passionate and harmonious. Focus on ORACLE,MySQL and other database programming,peformance tuning,db design, j2ee,Linux/AIX,Architecture tech,etc
全部博文(169)
发布时间:2020-11-04 15:27:53
显式或隐式类型转换要走INDEX FULL SCAN,必须增加NOT NULL约束或显示条件增加IS NOT NULL才能走INDEX (FAST) FULL SCAN。
否则to_char(object_id)='100'这种条件只是告诉优化器,to_char(object_id)肯定IS NOT NULL,
但是优化器不知道里面的参数object_id是否为NULL,所以不增加NOT NULL约束或不增加条件,肯定走不了INDEX FAST FULL SCAN,使用HINTS都不行
......【阅读全文】