Re: oracle indexes

From: joel garry <joel-garry_at_home.com>
Date: Thu, 5 Jun 2008 13:21:19 -0700 (PDT)
Message-ID: <e280efa1-9fb4-482f-957b-a81eba7086de@l28g2000prd.googlegroups.com>


On Jun 4, 9:01pm, 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
Received on Thu Jun 05 2008 - 15:21:19 CDT

Original text of this message