Forcing a Table Scan

Another way to avoid index usage is to come at the problem from the opposite direction by demanding a table scan. Use the FULL hint to instruct the optimizer to choose a full table scan instead of an index scan. Here is an example of how you specify the FULL hint:

SQL> select /*+ FULL(e) */ employee_id, last_name       from employees       where last_name like :b1;

Get Expert Indexing in Oracle Database 11g: Maximum Performance for Your Database now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.