I\'ve got a very large MySQL table with about 150,000 rows of data. Currently, when I try and run
SELECT * FROM table WHERE id = \'1\';
the
You say you have an index, the explain says otherwise. However, if you really do, this is how to continue:
If you have an index on the column, and MySQL decides not to use it, it may by because:
ANALYZE TABLE
helps.In the case of (2) or (3), you could coax MySQL into using the index by index hint sytax, but if you do, be sure run some tests to determine whether it actually improves performance to use the index as you hint it.