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: diff. between Primary-Key and unique index

Re: diff. between Primary-Key and unique index

From: <karsten_schmidt8891_at_my-deja.com>
Date: Tue, 25 Jan 2000 12:15:42 GMT
Message-ID: <86k45c$7f9$1@nnrp1.deja.com>


Hi,

In article <86ilcf$l9k$1_at_plo.sierra.com>,   "Steve McDaniels" <steve.mcdaniels_at_sierra.com> wrote: [snip]
>
> So, rather than saying
>
> select * from my_table where indexed_field is not null
>
> one can use
>
> select /*+ INDEX( table_alias my_index) */ from my_table table_alias
>

I seriously doubt that. Given the the way you phrase your second query, you are asking for all rows - including the ones with null keys. your index cannot and will not be used - regardles of hints.

Karsten

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Jan 25 2000 - 06:15:42 CST

Original text of this message

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