Re: Ignore histograms on sql level

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Tue, 19 Jan 2021 16:39:10 -0500
Message-ID: <f2195446-c2da-0331-419a-32d8d69b6dd0_at_gmail.com>



Jonathan, I don't think that's possible. Optimizer first collects the object information which can be manipulated by column_stats, index_stats and opt_estimate hints. Only after that does the optimizer check the histograms to determine the actual cardinalities of the row sources. OPT_PARAM hint, mentioned by Tanel, is probably the only way of bypassing histograms except dropping them using DBMS_STATS.

Regards

On 1/19/21 2:47 PM, Jonathan Lewis wrote:
>
> I'm just wondering whether some form of the column_stats() hint could
> override the use of the histogram.
>
> Regards
> Jonathan Lewis
>
>
> On Tue, 19 Jan 2021 at 06:25, Tanel Poder <tanel_at_tanelpoder.com
> <mailto:tanel_at_tanelpoder.com>> wrote:
>
> Hi Moustafa,
>
> If you really need to do this at SQL level, you couldĀ use
> *opt_param* hint with *_optimizer_use_histograms = false*.
>
> But it would make this query ignore all histograms, not just one
> on a specific column:
>
>

-- 
Mladen Gogala
Database Consultant
http://mgogala.byethost5.com


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jan 19 2021 - 22:39:10 CET

Original text of this message