When I run the following querys in MySQL:
SELECT count(*) FROM Inventory AS i WHERE i.lastModified > 1389920146804
or
SELECT i._id FROM Inventory AS i WHERE i.lastModified > 1389920146804;
The EXPLANE
command will show that the index on lastModified is used.
But when I run
SELECT * FROM Inventory AS i WHERE i.lastModified > 1389920146804;
or any other query with more then two rows we got a full table scan.
Why? How can I avoid a full table scan when selecting more then one row?
Inventory
table ???