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
全部博文(166)
发布时间: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都不行
......