Oracle强制使用
索引:
select /*+ INDEX(T_MEDFLOW_INTENT,SYS_C00ADDCODE) */ count(t.addcode)
from T_MEDFLOW_INTENT t
where 1 = 1
AND (AddCode = '4401' or (1 = 1) or
addcode in (SELECT Addcode FROM UserAdd WHERE userID = '440916'))
AND smemberName like '广东%'
/*+ INDEX(T_MEDFLOW_INTENT,SYS_C00ADDCODE) */ 就是强制使用索引
INDEX(表名,索引名称)