Bind Variable - Query slow

From: GovindanK <>
Date: Thu, 22 Mar 2012 22:53:15 -0700
Message-ID: <>

Linux RAC ,
Query runs fast with hard coding / SQL*Plus '&' ; But when run through the application using bind variables , the plan is different and it goes for MERGE CARTESIAN JOIN. Metalink , google , underscore parameters are not of much help. Tried different bucket sizes with statistics ; Tried rewriting the query; Marginal improvement ; If you hard code or with SQL*Plus '&' the query runs in 1 second .. but with bind variable it takes anywhere from 3 to 10 minutes depending on the input values. With hard code , it does not do MCJ but plan is different for few tables.  I don't say the query is written the best way.

Any input would be appreciated.


Received on Fri Mar 23 2012 - 00:53:15 CDT

Original text of this message