|
|
I am back from Beijing, your question is still outstanding ?
It seems that Oracle optimizer have changed this SQL's execution plan while you send through your applcaiton program, I have seem many time this problem happen. The only way you can do is that, pick up the best SQL from SQL Expert with Hints specified with the following syntax to fix the execution plan, then Oracle will not change its plan during excution of your SQL statement in your application. See, whether it works or not. Good luck !
SELECT /*+ Hints_xxxx */ COUNT(custID) custID
FROM DW_VCustEntrust
WHERE uploaddate
BETWEEN to_date(:v1,'YYYY-MM-DD')
AND to_date(:v2,'YYYY-MM-DD')
and DW_VCustEntrust.entrustType=:v3; |
|