Thank you very much for your help.
> An index the full size of the distinct key is probably very quick
> if it only has 20 distinct values. OTOH, if you already know you have a
> small number of distinct values, could you just store them normalized in a
> different table?
Actually, it is.
It has some tables:
And I´ll use a SELECT like this:
SELECT DISTINCT features.description
LEFT JOIN features ON (products.feature_id = features.id)
WHERE products.group_id = $var_group
AND products.features_id > 0
The table products should have a million of records, but the
filtered query should goes over a thousand records (filtered
by group_id) and return about 20 distinct lines.
It´s my situation but I don´t know how heavy such query is
for the database and how viable such query is.
Thanks in advance,