Re: CUBE temp table transformation gives bad access plan?

From: Martin Preiss <mtnpreiss_at_gmx.de>
Date: Thu, 30 Oct 2014 16:16:44 +0100
Message-ID: <5452565C.7030107_at_gmx.de>



Kim,

there are some points I do not really understand:

  • when you say: "virtual column" - do you mean a vrtual column defined as TRUNC(fakturadato,'MM') in the DDL of the table or just a query element?
  • when Oracle labels this operation a skip scan - why is the leading index column an access predicate? (maybe that's more of a rhetorical question...)
  • do you get decent cardinalities when you issue:

explain plan for
select /*+ index(fp I_102VAREGRPDEBGRPIDX) */

        count(*)
   from DEBFAKPOST fp
  where fp.dataset = 'DAT'
and fp.fakturadato >= date '2013-01-01'

    and fp.fakturadato < date '2013-02-01';

Even the good plan seems not to do a very good job to determine the DEBFAKPOST-cardinalities and maybe there is a problem with the min or max values for FAKTURADATO (perhaps a default 2099 or 9999 - without histograms this could create some problems with the optimizer's expectation of evenly distributed values).

Regards

Martin

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 30 2014 - 16:16:44 CET

Original text of this message