Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011

    Exclamation 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+'
    THEN 0.07
    WHEN domain_desc = 'C'
    THEN 0.07
    WHEN domain_desc = 'D'
    THEN 0.07
    ELSE 0.07
    END AS kn_values
    FROM dt_domains_table WHERE domain_type LIKE 'CUST_RATING_ID'
    and bank_id =0
    ) rating
    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!
    Attached Thumbnails Attached Thumbnails BAD EXECUTION PLAN.gif   GOOD EXECUTION PLAN.gif  
    Last edited by cina81; 08-07-11 at 05:48.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts