Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can I define an index for a select statement.
You can give the optimizer a hint that may help:
select /*+INDEX (T1 myindex2name) */ *
from Invoice T1
order by InvoiceDate;
But in your case it will not use the index because it is sorted 1st by InvoiceNo then by InvoiceDate. You may want to create another index just on InvoiceDate if you are wanting to use it in this way.
Kenny Gump
OCP 7.3 DBA
![]() |
![]() |