Re: How to calculate cardinality for inequality in WHERE

  • From: Martin Klier <usn@xxxxxxxxx>
  • To: jonathan@xxxxxxxxxxxxxxxxxx
  • Date: Fri, 12 Jul 2013 16:55:41 +0200

Hi Jonathan,

I tried a few things with various cardinality and inequalities with
known predicate on this table, and it seems that the 5% thing is
correct: If card. is 5% or round this, the plan looks the same, and
estimates are quite similar.


Thanks for the hint & clarification.

Best regards
Martin

Jonathan Lewis schrieb:
> 
> Off the top of my head - and without checking it for 11g, Oracle treats this 
> as:
>   column < unknown
> which means 5% of current cardinality.
> 
> Short of a profile or cardinality hint there is no real alternative to the 
> type of solution you've used.
> 
> Regards
> Jonathan Lewis
> 
> 
> ________________________________________
> From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] on behalf 
> of Martin Klier [Martin.Klier@xxxxxxxxxx]
> Sent: 11 July 2013 14:27
> To: oracle-l@xxxxxxxxxxxxx
> Subject: How to calculate cardinality for inequality in WHERE
> 
> Hello listers,
> 
> today again, a question merely for understanding than for solving a
> current problem.
> 
> DB-Version 11.2.0.3.6 SE on Linux x86_64
> 
> select * from TABLE
> where QTY1 < QTY2;
> 
> There are approx. 1.5 million rows in this table.
> QTY1 < QTY2 means 0, 1 or 2 rows at max--
> //www.freelists.org/webpage/oracle-l
> 
> 
> 

-- 
Usn's IT Blog for Oracle and Linux
http://www.usn-it.de

--
//www.freelists.org/webpage/oracle-l


Other related posts: