-
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
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|