Re: force use of an index - how to?

From: Mike Rife <rife_at_aarlo.moffitt.usf.edu>
Date: 1995/04/19
Message-ID: <3n3jkk$l4q_at_mother.usf.edu>#1/1


In article <odysscci.323.0015F303_at_teleport.com>, odysscci_at_teleport.com (Jim Kennedy) says:
>
>Let us say I have a table called person with lastname,firstname,middlename. I
>want a list of everyone but sorted by lastname,firstname,middlename.
>
>thus:
>select * from person order by lastname,firstname,middlename;
>
>Assume I have created an index on lastname,firstname,middlename.
>
>I am using Oracle 7.1.3.3 and It keeps doing a full table scan
>and then sorting the results. Not good. I have added where rownum<1000 and
>that certainly is much faster, but I want the possibility of fetching the
>whole result set. I have tried hints by specifying the index to use and I
>have tried setting things up so I get best response time on first rows.
>Nothing made it any better. Any suggestions besides don't do that.
>
>Jim Kennedy

Try adding " WHERE LASTNAME > ' ' ". I have done this in V6. I'm not sure if it will work in ORACLE7. Received on Wed Apr 19 1995 - 00:00:00 CEST

Original text of this message