One thing I don't understand is when I run the same delete statement with the Bind Variable ( different values) in Toad or sqlplus, the delete's are quick and the index is being used. But from the application it takes > 20-30 seconds . I asked the developer if the datatype of the bind variable was same as the indexed column and he confirmed it. Is there something we need to check in the application code.
When executing from SQLPlus... are you actually using a bind variable or are you using a literal? e.g. the actual value?
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width