Subject indexing on fields having a small variation of values
Author Vahan Yoghoudjian
Hi Group...

I have a theoretical question about indexes... I have a stock item table
containing a field called status which can have only 5 values. In the
application the user has the possibility to select one of the status values
to see only items with that status, in that case I run a similar query

select Code,Name,....
from Items
where Status = :status
Order by Code

I have read previously in this group that using an index on fields
having a small variation of values is deadly (correct me if I'm wrong).
Knowing that in this table the field Code is the primary key. Do I need an
extra index on fields (Status + Code)? When I define an index on Status +
Code an index tree is created on the concatenation of the values of those
two fields together?

Hope I made myself clear
Thanks in advance

Vahan



[Non-text portions of this message have been removed]