7 Replies Latest reply on Jan 17, 2013 7:26 PM by Nikolay Savvinov

    How to ensure a hard parse happens!

      We are on Oracle on Solaris 10. I have a situaion where a query coming from java code and which uses prepared statement is not doing well. Now if I put this hint /*+ CURSOR_SHARING_EXACT */ and run the sql with literal it goes very fast.

      something like select ename from emp where empno=112; is very fast but select ename from emp where empno=:1 is very slow. Now we have to ensure the query does not use bind variable. How do I ensure it? What do I need to tell the developer so that he writes the sql in such a way that it doesn't use bind variables (please take other facts are proven - I mean that once the query doesn't use bind variable it goes very fast is repeatedly tested and confirmed, the question is now how to ensure it).