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: Importance of Column Order in Composite Index

Re: Importance of Column Order in Composite Index

From: Howard J. Rogers <howardjr_at_www.com>
Date: Sat, 3 Nov 2001 07:44:17 +1100
Message-ID: <3be3057f$0$3440$afc38c87@news.optusnet.com.au>


Good question, but if the table has any real degree of DML, bitmaps are out, I'd say.

Regards
HJR

--

Oracle Resources : http://www.geocities.com/howardjr2000
========================================


"John Russell" <netnews_at_johnrussell.mailshell.com> wrote in message
news:a9m5ut85evjvhav62fs51alpiejvv5ieg1_at_4ax.com...

> The distribution of values looks like the sort of situation where
> bitmap indexes are recommended (going by the docs), especially if the
> queries use lots of AND conditions testing for the precise values. I
> wonder if there is particular benefit in this case to make the other
> index(es) bitmap ones?
>
> John
>
> On Wed, 31 Oct 2001 09:15:58 +1100, "Howard J. Rogers"
> <howardjr_at_www.com> wrote:
>
> >Indexing as X, Y, Z might actually be preferable, because with the low
> >selectivity columns first, you can use index key compression, and get
much
> >more compact indexes (and hence much lower I/O) than you might otherwise
> >manage. That's assuming you have at least 8i, of course.
> >
> >The old myth about the most selective column needing to be first is just
> >that -a myth. Hasn't been true for ages. Whatever the order, the space
in
> >the leaf nodes is going to be the same, and the only benefit of having Z
> >first would be a potential saving in branch nodes because of the possible
> >trimming of branch entries that can take place -but that's probably not
even
> >going to be noticeable.
> >
> >9i has skip scanning of indexes which means searches for non-leading keys
> >can be done efficiently, so that shouldn't be a major issues there.
> >
> >And if you select for X, and X isn't in the index at all, I doubt the Z,Y
> >index will be touched.
> >
> >Just my first thoughts. I may have seconds, though.
> >
> >Regards
> >HJR
>
> --
> Got an Oracle database question?
> Try the search engine for the database docs at:
> http://tahiti.oracle.com/
Received on Fri Nov 02 2001 - 14:44:17 CST

Original text of this message

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