Re: Very unstable execution plan

From: Thomas Kellerer <thomas.kellerer_at_mgm-tp.com>
Date: Thu, 06 Jun 2013 08:36:04 +0200
Message-ID: <51B02DD4.20506_at_mgm-tp.com>



> The answer to the first part of your posting is just so cute I think
> I'll have to emulate it and write a blog about it (though it might be
> nice to see the plan, including predicate section, as pulled from
> memory by dbms_xplan). The plan is "the same" - but the later steps
> involve nested loop joins into tmp_vu_sparte by index idx_tmp_sparte
> - I'll bet the order of joining to those two copies have changed, so
> the predicates involved are different, which is why the numbers of
> rows (hence CR gets, hence CPU time) is so different.>

Yes your assumption is correct as it seems.

Now the question is: how can we convince the optimizer to do it always right?

> For the second part, check the predicate section of the plan for implicit conversions before you do anything else.

That's the first thing I checked. There are only comparisons on columns with the same datatype involved. Not parameters (or literals) at all.

Regards
Thomas

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 06 2013 - 08:36:04 CEST

Original text of this message