08-07-11, 04:42 #1Registered User
- Join Date
- Aug 2011
Unanswered: 2 Differente Execution Plan for the same query! why??
I have a problem with oracle PL/SQL statement.
the same query have 2 different execution plan when I change a parameter in sql.
The parameter is a value for the "where field".
One of execution plan si good, the sql respond in seconds. the other take our without result...
Ok this is the query:
SELECT /*+ parallel(tbp_ced_ccm_cust,2) */ bank_id,
rating.domain_desc AS rating,
nvl(rating.kn_values, 0.07) AS kn_values
FROM tbp_ced_ccm_cust cust
(SELECT domain_code, domain_desc,
WHEN domain_desc = 'C+'
WHEN domain_desc = 'C'
WHEN domain_desc = 'D'
END AS kn_values
FROM dt_domains_table WHERE domain_type LIKE 'CUST_RATING_ID'
and bank_id =0
ON cust.cust_rating_id = rating.domain_code
WHERE yearmonth_bank_ss = 20110299000006370036; <--- this is the parameter
The parameter is the value of partition for the table tbp_ced_ccm_cust.
I work with different partition.
I have try to update the statistics for all table in the sql.
I have recreate an index on DT_DOMAINS_TABLE.
I have flush the execution plan in oracle.
But nothing! the query have always 2 differente excution plane
Someone help me please!
Last edited by cina81; 08-07-11 at 04:48.
08-07-11, 10:36 #2Registered User
Provided Answers: 1You can lead some folks to knowledge, but you can not make them think.
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.