Re: How to calculate cardinality for inequality in WHERE

From: Martin Klier <usn_at_usn-it.de>
Date: Fri, 12 Jul 2013 16:55:41 +0200
Message-ID: <51E018ED.8090504_at_usn-it.de>



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_at_freelists.org [oracle-l-bounce_at_freelists.org] on behalf of Martin Klier [Martin.Klier_at_klug-is.de]
> Sent: 11 July 2013 14:27
> To: oracle-l_at_freelists.org
> 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--
> http://www.freelists.org/webpage/oracle-l
>
>
>

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

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jul 12 2013 - 16:55:41 CEST

Original text of this message