no_index hint; index is still used
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: no_index hint; index is still used

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322

    no_index hint; index is still used

    I heard dat no_index hint prevents query from using index..
    I tried out on a test server..
    The plan still shows index being used.

    SQL> select /*+ NO_INDEX('EMP_PK')*/ FIRST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID=112;

    FIRST_NAME
    --------------------
    Jose Manuel


    Execution Plan
    ----------------------------------------------------------
    0 SELECT STATEMENT Optimizer=FIRST_ROWS (Cost=2 Card=1 Bytes=9
    )

    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'EMPLOYEES' (Cost=2 Card=
    1 Bytes=9)

    2 1 INDEX (UNIQUE SCAN) OF 'EMP_PK' (UNIQUE) (Cost=1 Card=10
    7)


    Do i need to do sth else??
    lucky

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    read the docs and form your hint correctly

    http://www.lc.leidenuniv.nl/awcourse...tsref.htm#5300

  3. #3
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    Thanks
    lucky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width