查看字段统计信息SQL:
SELECT column_name, num_distinct,num_nulls, num_buckets,
(select count(1) from crm_interceptor_log) row_count
FROM DBA_TAB_COL_STATISTICS
WHERE table_name =UPPER('crm_interceptor_log')
AND column_name =UPPER( 'log_time') and rownum<2;
查询结果:
通过NULL值和DISTINCT值数量给出索引优化建议。