Re: oracle indexes

From: news.verizon.net <kennedyii_at_verizon.net>
Date: Fri, 06 Jun 2008 03:01:28 GMT
Message-ID: <cM12k.3020$Yx.232@trndny08>

"joel garry" <joel-garry_at_home.com> wrote in message news:e280efa1-9fb4-482f-957b-a81eba7086de_at_l28g2000prd.googlegroups.com... On Jun 4, 9:01 pm, doug <douglass_da..._at_earthlink.net> wrote:
> Hello,
>
> Say If I have a table with column a, and column b (say they are
> integers).
>
> Sometimes I will do a query with a where clause that just references
> column a.
>
> Sometimes I will do a query with a where clause that references both
> column a and b.
>
> Is there a need to create an index with a, and an index with a, b? Or
> will an index with a,b work for both of the above types of queries?
>
> I know in mysql if I have an index (a, b, c), then it is useful for
> queries referencing a or a,b or a, b,c. But, I am not as familiar
> with how Oracle indexes work.
>
> Thanks.

You should read about indexing in the concepts manual and the performance tuning manual. You can also search http://tahiti.oracle.com for the skip scan Jim mentioned, which answers your question.

Once you become comfortable with the basic concepts, you can delve deeper in many places, especially http://richardfoote.wordpress.com/ (be sure and check out the index internals presentation).

jg

--
@home.com is bogus.
I just don't understand why kids would do a stupid thing like
that... 
http://www.signonsandiego.com/uniontrib/20080605/news_1n5nude.html

I had forgotten to mention Richard Foote's web site.  It is excellent.  Lots 
of fantastic information there.
Jim 
Received on Thu Jun 05 2008 - 22:01:28 CDT

Original text of this message