Re: Ignore histograms on sql level
Date: Wed, 20 Jan 2021 12:11:39 +0000
Message-ID: <CAGtsp8moQWF95UVOOfTob-p6m_fucpO87wp1fAdXk6QCO4121A_at_mail.gmail.com>
That seems to be the case.
It's not necessarily to supply all the values, so the "safest" option, or
"most logical" option would simply be to disable the histogram and bring
the arithmetic back to using the recorded/known number of distinct values
with:
/*+ column_stats({owner}.{table} {column_name} set distinct=nn) */
{owner}. is optional
Regards
On Wed, 20 Jan 2021 at 02:33, Tanel Poder <tanel_at_tanelpoder.com> wrote:
> Cool,
{table} is the actual table name (not the alias).
"set" or "scale" seem to do the same thing
The commas shown by Sayan are optional
The order of the stats (if you want more than just distinct=) is variable
Jonathan Lewis
>
> 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
>
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Jan 20 2021 - 13:11:39 CET