I have a MySQL query (running MySQL 5.0.88), which I'm trying to speed up. The underlying table has multiple indices and for the query in question, the wrong index is used (i_active
- 16.000 rows, vs. i_iln
- 7 rows).
I'm not very experienced with MySQL but read there is a use index
hint, which can force mySQL to use a certain index. I'm trying it like this:
SELECT art.firma USE INDEX (i_iln)
...
but this produces a MySQL error.
Question:
Can anyone tell me what I'm doing wrong? (Except running 5.0.88, which I can't change.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…