Database Administration (MOSC)

MOSC Banner

Query dba_tab_columns was super slow

edited Jan 10, 2020 8:00PM in Database Administration (MOSC) 9 commentsAnswered ✓

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?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center