Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Indexes ignored

Re: Indexes ignored

From: Jim Poe <jbpoe_at_pacbell.net>
Date: Sat, 13 Jul 2002 15:42:01 GMT
Message-ID: <MPG.1799ea25daf4ede8989682@news.sf.sbcglobal.net>


> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US