Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: full table scan cheaper than index??
>
> select id, timestamp
> from my_table
> where timestamp > to_date('20010701','YYYYMMDD');
>
> The table "my_table" has an index, let's call it "my_index", on the column
> "timestamp".
>
This query may run slowly because oracle assumes that many rows will be returned. Try a first_rows hint:
select /*+ first_rows */ id, timestamp
from my_table
where timestamp > to_date('20010701','YYYYMMDD');
Received on Sat Jul 14 2001 - 05:38:51 CDT
![]() |
![]() |