----- Original Message -----
> From: "Sergei Petrunia" <psergey@stripped>
>
> Create index on (importance, company_id) (or
> (company_id,importance), should
> not matter). When that index is present, the query should use ref
> access on it using both key parts (if by some crazy reason it doesn't, use FORCE
> INDEX to make it to). This way, you will be scanning as few rows as possible.
Umm... It might just be a matter of cardinality? :-) While the optimizer can be wrong at
times (and it's certainly worth checking that) it does usually pick the best choices.
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel