Requête simple n'utilisant pas les index correctement
Bonjour,
J'essaye de corriger toutes mes requêtes n'utilisant pas d'index (log_queries_not_using_indexes)
Et je buche actuellement sur cette requête très simple.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| # Query_time: 0 Lock_time: 0 Rows_sent: 688 Rows_examined: 2295
SELECT
c_branche_link ,
c_branche_id ,
c_branche_nom
FROM
t_branche
WHERE
c_branche_status >= 2
AND
c_branche_news_nb > 0
ORDER BY
c_branche_id ASC; |
les champs c_branche_status et c_branche_news_nb sont bien indexés et pourtant ne sont pas utilisés :
id = 1
select_type = SIMPLE
table = t_branche
type = ALL
possible_keys = c_branche_news_nb,c_branche_status
key = NULL
key_len = NULL
ref = NULL
rows = 1607
Extra = Using where; Using filesort
Si quelqu'un à une idée ?
Merci,