Skip to Main Content
  • Questions
  • A select query uses Full table Scan. How to force the query using Index Scan option.

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.

Question and Answer

Connor McDonald

Thanks for the question, RUTHENDAR.

Asked: January 07, 2017 - 9:40 am UTC

Last updated: January 08, 2017 - 11:48 am UTC

Version: 11.2.0.2.0

Viewed 1000+ times

You Asked

A Select query is using Full table Scan. The execution time takes much long. How to force the query to use index scan option.

and Connor said...

You can use a hint for that, eg

select /*+ INDEX(t (index_col)) */ ...
from my_table t

but before you do that - you should be looking at *why* the optimizer has decided to do that. Better to research that first, eg out of date or incorrect stats, insufficient or incorrect histograms etc.



We're not taking comments currently, so please try again later if you want to add a comment.

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.