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: 2 overlapping indexes

Re: 2 overlapping indexes

From: Keith Boulton <kboulton_at_ntlworld.com>
Date: Sat, 26 Jan 2002 10:15:08 -0000
Message-ID: <rgv48.26482$Ph2.4673923@news2-win.server.ntlworld.com>


Sometimes I wonder how I can be so stupid.

The original poster wrote: "The data is unique on A,B, C" which I took to mean the data that this was a required constraint i.e. not simply a statement of the distribution of values in the data. If the former, then you must have a unique constraint on A,B,C. However if A,B,C is unique there is no point in having the additional column D in the index - as another poster has pointed out, you've already found an individual row with the first 3 columns.

Norman Dunbar <Norman.Dunbar_at_lfs.co.uk> wrote in message news:E2F6A70FE45242488C865C3BC1245DA7A0780F_at_lnewton.leeds.lfs.co.uk...
> Niall wrote :
>
> >> Like Norman I can't for the life of me see the point of adding col4
> as the
> >> statement is that the first three columns are unique. Unless I have
> misread
> >> the OP of course.
>
> No, Niall, we are correct, the original poster wrote :
>
> >> I have a table with column A, B, C, D and E. The data is unique on
> A,
> >> B and C so I create a unique index on that. Now I would also like to
> >> create a non-unique index on A, B, C and D.
>
> But, we know A,B,C is unique, so D cannot make them now non-unique -
> unless he is using SQL Server :o)
>
> ------------------------------------------------------------------------
> -----
> Norman Dunbar EMail: Norman.Dunbar_at_LFS.co.uk
> Database/Unix administrator Phone: 0113 289 6265
> Fax: 0113 289 3146
> Lynx Financial Systems Ltd. URL: http://www.Lynx-FS.com
> ------------------------------------------------------------------------
> -----
>
Received on Sat Jan 26 2002 - 04:15:08 CST

Original text of this message

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