Re: improve cardinality estimation

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Tue, 27 Oct 2020 22:11:17 -0400
Message-ID: <d71e2ea4-257d-d77e-d283-f212c0ed6a97_at_gmail.com>


Is this an OLTP  instance? If it is not, you may try with OPTIMIZER_DYNAMIC_SAMPLING=11. If that is an OLTP instance, using dynamic sampling will increase parsing time and lower the performance, albeit not drastically.

On 10/27/20 11:31 AM, Laurentiu Oprea wrote:
> Hello,
>
> I found a query with a very bad execution plan due to low
> cardinality evaluation of below where clause
>
> where
> sysdate between trunc(col_from_date) and
> trunc(nvl(col_to_date,sysdate+1))
>
> Is there any way I can improve the estimate (like extended stats, etc) ?
>
> Thanks for your help.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 28 2020 - 03:11:17 CET

Original text of this message