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: simple query not using index

Re: simple query not using index

From: Otis Gospodnetic <otis_at_my-deja.com>
Date: 2000/04/17
Message-ID: <8df7se$o61$1@nnrp1.deja.com>#1/1

In article <20000416013351.10954.00000522_at_ng-cs1.aol.com>,   mmayer3077_at_aol.com (MMayer3077) wrote: >
> The datatype is NUMBER(38) on the indexed column? This is a very
 large range
> of numbers. This index may not be working because this range of
 number values
> is so much larger then the number of records.

Hi,

Large range - you mean the (38) part - should I make it a number(some- -value)?

The index is actually created on 2 columns, like this:

create index my_index on my_table(date_dolumn desc, fk_number_column);

The problematic query is:

select * from my_table where fk_number_column=23 order by date_column desc;

Thanks,

Otis

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Apr 17 2000 - 00:00:00 CDT

Original text of this message

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