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: SQL Tunning

Re: SQL Tunning

From: Hans-Peter Sloot <H.G.Sloot_at_kpn.com>
Date: Mon, 22 Mar 1999 08:58:23 +0100
Message-ID: <36F5F81F.AE1B64C2@kpn.com>


What you could do is create a concatenated index on address_id and any other small column in the same table. You could even add a dummy column with a default value of 'x'.

The NULL, 'x' combinations are included in b-tree indexes.

I tried this out sometime ago and it works.

This is better than creating a dummy value like -1 or so because that affects the functionality of the software.

"Christopher M. Day" wrote:
>
> Roman,
>
> Sybrand, Andrew and Serge are right about b-tree indexes, but is the
> column a candidate for a bitmap index, which will store null values.
>
> Chris.
>
> Roman Gelfand wrote:
> >
> > Consider the following statement.
> >
> > select first_name, last_name from table_adress where address_id is null;
> >
> > Eventhough address_id is indexed uniquely, there is a full table scan. Is
> > there a way to force index use without changing the sql statement?
> >
> > Thanks in advance
> > Roman
Received on Mon Mar 22 1999 - 01:58:23 CST

Original text of this message

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