Thumbnail sketch - which wasn't in the book, but is described in detail by
Alberto Dell'Era.
If you have other predicates on the table then the "ndv" in the formula is not
the num_distinct from user_tab_cols, it is an adjusted figure that answers the
question:
"How many distinct value am I likely to see in the subset of rows identified by
the other predicates?"
For example: if I have 1M rows in the table with 2000 distinct values in
column X and some other predicates on the table identify 2,500 rows from the
table, how many of the 2,000 possible values are likely to show up in the 2,500
rows selected.
Regards
Jonathan Lewis
________________________________________
From: oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> on behalf
of Patrick Jolliffe <jolliffe@xxxxxxxxx>
Sent: 31 May 2019 12:03:51
To: Sayan Malakshinov
Cc: Stefan Koehler; oracle-l
Subject: Re: Join Cardinality
Thanks both, let me try and follow up over the weekend.
Stefan,
Maybe it's cos I'm tired, but I could see the SWRU referenced and used
throughout the paper, but I couldn't actually find the definition of the SWRU
function,
Am I missing something?
Patrick
On Fri, 31 May 2019 at 18:59, Sayan Malakshinov
<xt.and.r@xxxxxxxxx<mailto:xt.and.r@xxxxxxxxx>> wrote:
Hi Patrick,
JSEL should be 1/50, since you already filtered T1 ("T1"."RAND20"=1) and got 50
rows
--
Best regards,
Sayan Malakshinov
Oracle performance tuning engineer
Oracle ACE Associate
http://orasql.org
--
//www.freelists.org/webpage/oracle-l