ora sql 优化

ora sql 优化
ora sql 强行用某个索引
select /*+index(t_customer idx_t_cust_area_name)*/    --强行利用t_customer的索引 idx_t_cust_area_name 进行查询
         count(*)
          into v_count
          from t_customer
         where parent_cust_id = in_parent_cust_id
           and type = 1
           and customer_area_code = in_customer_area_code
           and customer_name = in_customer_name;

分析表
analyze table T_INDUSTRY compute statistics;

你可能感兴趣的:(ora sql 优化)