Database Tuning (MOSC)

MOSC Banner

sql hints both of full table scan and index ?

edited May 29, 2012 12:37AM in Database Tuning (MOSC) 4 commentsAnswered
Hi all,

   I created table with name T_A (m_id number, m_val varchar2, m_date date, m_sal number).

   I created two indexes:

      + On the m_id with name is IDX_ID.

      + On the m_sal with name is IDX_SAL.

   Ok, if i use:

        select * from T_A where m_id = 1

  But I recognize that full table scan will better than use  IDX_ID on m_id but use index on m_sal will better than full table scan, and I use:

        select /*+ FULL(T_A) INDEX(T_A IDX_SAL) */ * from T_A where m_id = 1 and m_sal = 10;

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