RE: How to calculate cardinality for inequality in WHERE

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 11 Jul 2013 15:08:13 +0000
Message-ID: <CE70217733273F49A8A162EE074F64D90140D3B2_at_exmbx06.thus.corp>


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 Received on Thu Jul 11 2013 - 17:08:13 CEST

Original text of this message