Re: oracle indexes
Date: Thu, 05 Jun 2008 09:36:53 -0700
> Say If I have a table with column a, and column b (say they are
> 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.
Assuming a currently supported version of Oracle it works the same way. It will even in many cases support a query on b and b,c that does not include a.
But you have, for some reason, not provided version information so this response is purely generic.
Oracle changes, often dramatically from version to version with respect to specific functionality. Always, when asking Oracle questions include full version information ... 3+ decimal places.
-- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Jun 05 2008 - 11:36:53 CDT