Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Indexes ignored
> Oracle will only use an index if they columns being searched for are in
> the WHERE clause. Without an index on NBR, this query will NEVER use
> any index because it does not know to use any other index. This
> particular query will result in a full table scan.
>
My mistake, NBR has a unique index.
> So, add the index, analyze the tables and this one should now complete
> in 1-2 seconds.
>
Still taking 10 secs.
> Just a nit, but why would anyone use a varchar field for a field that
> will only contain numbers? I can't think of anyplace that uses BR549
> any more... :) << that should date some people :)
>
>
Because there is no advantage to defining it as a
number. The data will never be used as a number. Also,
large international numbers can get you into range
problems depending on the front end tool you are using.
Thanks
-- Jim Poe <jbpoe_at_pacbell.net>Received on Sat Jul 13 2002 - 10:42:01 CDT