Database Administration (MOSC)

MOSC Banner

full table scan or index scan

edited Aug 8, 2013 9:10PM in Database Administration (MOSC) 7 commentsAnswered
We are using database version 11.2.0.2

My developer is complaining that one query is running slow around 3 to 5 minutes.

SELECT * FROM T_TST_DATA WHERE  PRC_INFO_ID=’ C004’;

I looked at the database and found out that the table has three indexes. Only one index has the column name PRC_INFO_ID.

SQL> select column_name from dba_ind_columns where index_name='T_TST_DATA_INDEX1';

 

COLUMN_NAME

--------------------------------------------------------------------------------

PRC_INFO_ID

PRD_INFO_ID

TST_ID

TST_DATA_ID

So looks like his query is still using the full table scan. Thus, it is slow. My question is if the column does belong to a combination index, how can we make the query to use this index? Gurus, Please advise. Thanks.

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