Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle covering indexes - equivalent to SQL Server INCLUDE indexes ?

Andy MackieMar 23 2011 — edited Mar 27 2011
For covering indexes in Oracle, does it have anything similar to SQL Server's INCLUDE indexes ?

These allow you to define the index key on just the columns used for selection, keeping the index key narrow, but add the other columns needed to cover the query into the leaf level of the index.
e.g.
CREATE NONCLUSTERED INDEX NC_EmpDep ON Employee(EmployeeID, DepartmentID) INCLUDE (Lastname)

Is there anything similar in Oracle ? Or do you have to define the index on all the columns to get a covering index in Oracle ?
e.g.
CREATE INDEX NC_EmpDep ON Employee(EmployeeID, DepartmentID, Lastname)

That would cover the query, but the index key is now bigger than it needs to be.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2011
Added on Mar 23 2011
4 comments
6,281 views