RGuillermo
asked on
Mysql select .. how to chose index
Hello Experts,
I have a table with 140 thousand records
and a simple select like:
SELECT * FROM TBL_TRE_CO2 WHERE PAT_COD =12728
field pat_cod is the second index (not automatic increment which is the first index)
takes 5 seconds which is too much for each query
then I executed EXPLAIN showing there is "no possible keys", and " No keys"
how can I force the select to use a certain index?
Best regards,
I have a table with 140 thousand records
and a simple select like:
SELECT * FROM TBL_TRE_CO2 WHERE PAT_COD =12728
field pat_cod is the second index (not automatic increment which is the first index)
takes 5 seconds which is too much for each query
then I executed EXPLAIN showing there is "no possible keys", and " No keys"
how can I force the select to use a certain index?
Best regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.