Re: Height Balanced Histogram on a unique varchar2 column
From: Sayan Sergeevich Malakshinov <malakshinovss_at_psbank.ru>
Date: Fri, 31 Oct 2014 14:26:57 +0300
Message-ID: <OF7E4941D9.11E68743-ONC3257D82.003D7A33-C3257D82.003EE3EC_at_psbank.ru>
> Mohamed Houri <mohamed.houri_at_gmail.com>
>
> What benefit the CBO can gain from a unique varchar2 column having
> height balanced histogram (11.2.0.3.0) ?
Date: Fri, 31 Oct 2014 14:26:57 +0300
Message-ID: <OF7E4941D9.11E68743-ONC3257D82.003D7A33-C3257D82.003EE3EC_at_psbank.ru>
> Mohamed Houri <mohamed.houri_at_gmail.com>
>
> What benefit the CBO can gain from a unique varchar2 column having
> height balanced histogram (11.2.0.3.0) ?
CBO doesn't know real logic, so it can assume that you have queries with "like", "substr", "<=", "between".
> create table t1
> (col1 number
> ,col2 varchar2(50)
> ,flag varchar2(2));
Also, as i remember, CBO stores only first 30 chars for varchar2 columns in the histograms and high/low values.
-- Best regards, Sayan Malakshinov http://orasql.org -- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 31 2014 - 12:26:57 CET