Skip to Main Content

SQL & PL/SQL

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!

Index question

donovan7800Nov 17 2015 — edited Nov 17 2015

Small question,

If I know I will have queries like:

WHERE colA = 'XXX'

AND colB = 'YYY'

AND colC = 'ZZZ'

WHERE colA = 'XXX'


WHERE colB = 'YYY'


WHERE colC = 'ZZZ'


but I know I will NOT have any partial usage of columns like:

WHERE colA = 'XXX'

AND colB = 'YYY'


Then I only need to create a single index on (colA, colB, colC) right? 


And if I did have a 2-column WHERE conditions using the above example, then I would want to make additional indexes for (colA, colB)  (colB, colC) (colA, colC) right?


Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 15 2015
Added on Nov 17 2015
5 comments
341 views