In the CUSTOMERS_OBE table,when the value of CUST_STATE_PROVINCE is "CA", the value of COUNTRY_ID is "US."
View the Exhibit exhibit2 to examine the commands and query plans.
The optimizer can sense 8 rows instead of 29 rows,which is the actual number of rows in the table.
What can you do to make the optimizer detect the actual selectivity?
A. Change the STALE_PERCENT value for the CUSTOMERS_OBE table.
B. Set the STATISTICS_LEVEL parameter to TYPICAL.
C. Create extended statistics for the CUST_STATE_PROVINCE and CUSTOMERS_OBE.COUNTRY_ID columns.
D. Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE.
答案:(C)
解析:
需要收集CUST_STATE_PROVINCE和CUSTOMERS_OBE两列组合的数值分布的扩展统计信息