Hello, We are running a mysql database version 3.22.32.
I have an simple table: id, int(10) unsigned, PRI, default 0, auto_increment usernummer, int(10) unsigned, default 0 productcode, char(10), default '' monat, tinyint(3) unsigned, default 0 jahr, mediumint(8) unsigned, MUL, 0 and two indizes: mysql> show index from reporting; +-----------+------------+----------+--------------+-------------+-----------+-------------+----------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | +-----------+------------+----------+--------------+-------------+-----------+-------------+----------+ | reporting | 0 | PRIMARY | 1 | id | A | 3689 | NULL | | reporting | 1 | jahr_idx | 1 | jahr | A | NULL | NULL | +-----------+------------+----------+--------------+-------------+-----------+-------------+----------+ when i commit this select: 'SELECT * FROM reporting WHERE jahr=2002;' it seems that the index isn't hit. mysql> explain select * from reporting where jahr=2002; +-----------+------+---------------+------+---------+------+------+------------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +-----------+------+---------------+------+---------+------+------+------------+ | reporting | ALL | jahr_idx | NULL | NULL | NULL | 3689 | where used | +-----------+------+---------------+------+---------+------+------+------------+ 1 row in set (0.00 sec) Can someone tell me why the index is not hit??? Thanks, Stephan --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php