MySQL Forums
Forum List  »  Optimizer & Parser

indices not used
Posted by: Martin Luy
Date: May 25, 2010 04:13AM

hi,

these are some of my indices in a MyISAM table:

factor_key INDEX 1836784 Edit Drop factor
ean_key INDEX 5510354 Edit Drop ean

The columns: (the values of factor are between 0 and 1)
factor float Yes NULL
ean varchar(13) utf8_general_ci Yes NULL


EXPLAIN (SELECT * FROM products ORDER BY factor)

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE products ALL NULL NULL NULL NULL 5510354 Using filesort


EXPLAIN(SELECT * FROM `products` WHERE ean > 9780000000000 AND ean < 9780000000002)

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE products ALL ean_key NULL NULL NULL 5510354 Using where


Why are the indices not used?

Martin

Options: ReplyQuote


Subject
Views
Written By
Posted
indices not used
2775
May 25, 2010 04:13AM
1598
May 25, 2010 12:07PM
1495
May 27, 2010 08:35PM
1436
June 19, 2010 03:35AM
1403
June 21, 2010 06:25PM
1340
June 22, 2010 01:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.