Path: text.usenetserver.com!out01a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 12 Dec 2006 16:35:02 -0600
From: "Jonathan Lewis" <jonathan@jlcomp.demon.co.uk>
Newsgroups: comp.databases.oracle.server
References: <1165960064.046563.211800@n67g2000cwd.googlegroups.com>   <frmdnbkwbrTGteLYnZ2dnUVZ8q6nnZ2d@bt.com>   <1165961761.805346.111320@16g2000cwy.googlegroups.com> <1165962649.719151.162500@16g2000cwy.googlegroups.com>
Subject: Re: Join selectivity is 0 causing bad cardinality estimates.
Date: Tue, 12 Dec 2006 22:35:03 -0000
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
Message-ID: <0_idnbY-AosLs-LYnZ2dnUVZ8ty3nZ2d@bt.com>
Lines: 27
NNTP-Posting-Host: 86.130.242.224
X-AuthenticatedUsername: NoAuthUser
X-Trace: sv3-vU4u6zStPQEQ8RYz9IXouaR/acaOLDknB1y7yTWTi+PNbnk4nGm3fc2tJ52iuiBemrOKg8jzoemeyGb!N1wCecnQoEiBpPnUm2w7DW61j9g/L9MtLNYf4mvFYhKnRSQBy8wT63V3Rh6EeDiOeOIA7HW3+nGh
X-Complaints-To: abuse@btinternet.com
X-DMCA-Complaints-To: abuse@btinternet.com
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
Xref: usenetserver.com comp.databases.oracle.server:419075
X-Received-Date: Tue, 12 Dec 2006 17:35:03 EST (text.usenetserver.com)

<andrew.markiewicz@gmail.com> wrote in message 
news:1165962649.719151.162500@16g2000cwy.googlegroups.com...
> We also have histograms calculated using a similar method as you have,
> FOR ALL COLUMNS SIZE AUTO.
>

That's your main problem.

You don't need histograms on all columns,
and you don't want to let Oracle work out
the details.


-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html



