dbms_stats分析表后,查询不走索引了
select * from ipinfo where startip < ip and endip > ip
建组合索引 (startip,endip)后,查询走索引且 cost cardinality bytes 都正常
但 执行 dbms_stats后
exec dbms_stats.gather_table_stats(ownname => 'user',tabname => 'ipinfo',method_opt => 'for all indexed columns',cascade => true);
非但不走索引, cardinality bytes 都 异常的大
求原因 和 恢复方法 谢谢!