Re: Ignore histograms on sql level

From: Sayan Malakshinov <xt.and.r_at_gmail.com>
Date: Wed, 20 Jan 2021 05:48:06 +0300
Message-ID: <CAOVevU6iroALTAV+5Qcui2G3+nVSqFapuGqAzZ2jWBcB0xdyyw_at_mail.gmail.com>



Hi Tanel,

Anyway, I absolutely agree with your advice to investigate and fix a root cause of the problem, since it will be a pain-in-the-ass to change the hint every time you gather statistics to sync it with updated statistics. And even as a fast workaround I'd prefer to fix good plan using sql patch/profile/baseline than to hint with column_stats().

--
Best regards,
Sayan Malakshinov
Oracle performance tuning expert
Oracle Database Developer Choice Award winner
Oracle ACE Associate
http://orasql.org

ср, 20 янв. 2021 г., 5:33 Tanel Poder <tanel_at_tanelpoder.com>:


> Cool,
>
> So with COLUMN_STATS you could use a SQL Patch to precisely disable
> histogram use for just one column of a single table in a single query.
>
> --
> Tanel Poder
> https://tanelpoder.com/events
>
>
> On Tue, Jan 19, 2021 at 5:27 PM Sayan Malakshinov <xt.and.r_at_gmail.com>
> wrote:
>
>> Hi listers,
>>
>> Jonathan is absolutely correct as always - we can easily get it using the
>> following format:
>> column_stats("OWNER"."TABLE", "COLUMN", scale, length=NN distinct=NN
>> nulls=NN min=NN max=NN)
>>
>> Simple example:
>> // Full example:
>> https://gist.github.com/xtender/fc3882af2ba3801935bdff2f3c17e567
>>
>>
-- http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 20 2021 - 03:48:06 CET

Original text of this message