Re: slow query on CDB_FREE_SPACE

From: Timur Akhmadeev <timur.akhmadeev_at_gmail.com>
Date: Tue, 17 Oct 2023 12:50:51 +0300
Message-ID: <CACGsLCJEfxxFh4ZuzE15WVMatME_W530ZTF-VpK1NR76eTSnjQ_at_mail.gmail.com>



Does it work with "_px_cdb_view_enabled"=false?

On Tue, Oct 17, 2023 at 11:38 AM Laurentiu Oprea < laurentiu.oprea06_at_gmail.com> wrote:

> Dear all,
>
> Most probably we all hit at some point issues where querying
> DBA_FREE_SPACE is slow.
>
> I have the next issue:
> -> query on CDB_FREE_SPACE is slow , issue being located in a particular
> PDB
> -> querying DBA_FREE_SPACE in problematic PDB I can see issue is caused by
> execution plan full scanning X$KTFBUE
> -> I gathered stats on X$KTFBUE and issue was still there
> -> I observed that setting optimizer_adaptive_plans to false will do the
> trick
> -> went back in container , set optimizer_adaptive_plans to false at
> session level and worked, so I thought great, I`ll create a sql patch with
> hint opt_param('optimizer_adaptive_plans' 'false') but when hint is
> applied in the query from CDB$ROOT is not propagated into PDBs (is working
> only with alter session). The hint is working if I switch to PDB and run
> the query with the hint there.
>
> Any ideas on how to solve this problem?
>
> Thank you.
>
>

-- 
Regards
Timur Akhmadeev

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Oct 17 2023 - 11:50:51 CEST

Original text of this message