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: Oracle 8.1.7 Concatenate Key

Re: Oracle 8.1.7 Concatenate Key

From: Pete Sharman <peter.sharman_at_oracle.com>
Date: Fri, 31 Aug 2001 09:34:27 -0700
Message-ID: <F8Pj7.12$aG6.1451@inet16.us.oracle.com>


Yet another new feature to check ou in 9i - skip scanning of indexes. Allows a composite index to be used to satisfy a query, even if the leading columns aren't referenced.

--
HTH.  Additions and corrections welcome.

Pete
Author of "Oracle8i: Architecture and Administration Exam Cram"
Now got a life back again that the book is released!

"Controlling developers is like herding cats."
Kevin Loney, Oracle DBA Handbook

"Oh no, it's not.  It's much harder than that!"
Bruce Pihlamae, long-term Oracle DBA

"Howard J. Rogers" <howardjr_at_www.com> wrote in message
news:3b8ea281_at_news.iprimus.com.au...

> A concatenated key is one that comprises two or more columns. Hence:
create
> index on emp(empno,ename) results in a concatenated key.
>
> Useful? Well, it depends. Do I often query using that combination? Even
> if I query by only one or other at different times, there may be benefit
in
> having a single index on both columns, rather than two on each one
> separately. If I have a primary key on a table, I get an index created
for
> me whether I want it or not -how about combining that index with one on a
> column I actually query against extremely regularly?
>
> Just be aware that the order of concatenation is signficant. In my
earlier
> example, a query 'select * from emp where empno=999' will be able to use
> index access easily, because empno is the leading column. But a 'select *
> from emp where ename='Fred'' would require a complete index range scan,
> since not all our Freds will be sorted together, and could hence lie
> anywhere within the index.
>
> So the index still gets used, but not necessarily in the way you (or your
> application) would prefer.
>
> Regards
> HJR
>
>
>
>
> "Werner Faßbender" <LUP_at_edv3.de> wrote in message
> news:3B8A5B77.6AFF2A2E_at_edv3.de...
> > Hi,
> >
> > Oracle DB Release 8.1.7
> >
> > what is a concatenate Key ?
> >
> > what are the beniftis using such a key where are the diffrents?
> >
> > when is it usefull?
> >
> > with regards
> > Werner Fassbender
> >
> >
> >
> >
>
>
Received on Fri Aug 31 2001 - 11:34:27 CDT

Original text of this message

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