Re: dimension table

  • From: Greg Rahn <greg@xxxxxxxxxxxxxxxxxx>
  • To: kp0773@xxxxxxxxx
  • Date: Tue, 8 Dec 2009 14:21:51 -0800

What troubleshooting have you done - give us some context?  Where do
you perceive the problem to be and why?  Are the cardinality estimates
representative?
(BTW - not having the SQL or at least the predicate section of the
plan will make it nearly impossible to give much valuable feedback)

Can you simplify this down to a 2 table query like such:

select count(*)
from
  SALDB.DIM_DATE d
  SALDB.FACT_PGP_OPP f
where
  f.date_key = d.date_key and
  d.quarter = 1   -- or whatever filters there are on these 2 tables

You can find the filters in the predicates section of the dbms_xplan output.

How many rows come back?  181,000?  How many rows come back when the
2nd dim_date is added? (rowsource #25)

The plan shows a very low ROWS estimate (<14) for every row source
after the 3rd join (DIM_DATE-> FACT_PGP_OPP -> DIM_DATE).  Given the #
of NL joins, if those first joins produce a much larger row set, that
plan will be quite slow.



On Tue, Dec 8, 2009 at 12:52 PM, Kar <kp0773@xxxxxxxxx> wrote:
> Thanks Guys . . having a tough time with this table.
> Attaching the plan . wont be able to put the query for nda issues.
> appreciate any help.

-- 
Regards,
Greg Rahn
http://structureddata.org
--
//www.freelists.org/webpage/oracle-l


Other related posts: