Query dba_tab_columns was super slow
I wonder if anyone run into this issue and have a way to fix it other than a work around.
DBA_TAB_COLUMNS in one of our database is very slow on simple query like:
select column_name
from dba_tab_columns
where table_name like 'V_$INSTANCE'
and column_name = 'EDITION';
It took 1 hours and 34 minutes in this database while other database generate the result in less than a second.
I found a work around:
alter session set "_optimizer_cbqt_or_expansion"=off;
However, I wonder if this parameter change should be implemented in the database level.Will it cause any problem for other queries? Is there a way to fix this issue other than setting this hidden parameter?