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;