ora sql 強(qiáng)行用某個(gè)索引
select /*+index(t_customer idx_t_cust_area_name)*/????--強(qiáng)行利用t_customer的索引?idx_t_cust_area_name?進(jìn)行查詢
???????? 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;