Harald: warum benutzt mysql den index nicht?

Beitrag lesen

Hi,

EXPLAIN SELECT FILE , count(
FILE ) AS anzahl, data, title, max( wert )
FROM tabelle
USE INDEX (
FILE )
WHERE datum >= '2005-02-13' AND datum <= '2005-02-13'
GROUP BY FILE ORDER BY anzahl DESC
LIMIT 1 , 20

schmeiß raus:

table: tabelle
type: index
possible_keys: NULL
key: file
key_len: 255
ref : NULL
rows: 94136
Extra: Using where; Using temporary; Using filesort

Der Index von "file" ist aber gerade mal 16805 rows groß.
Ein "force index" bringt auch nix. Warum macht mysql das?

Gruß
Harry