MySQL not using index on DATE when used with '<' or '>' operators? -


I am using these questions to explain how to test. Call type is DATE

This index uses:

  Explain selection event. Events from WHERE events.date = '2010-06- 11'  

this is not

  Explain the selection event. From events where events.date & gt; The index is as follows (phpmyadmin)  
  Action keyname type Unique Packed Regional Cardinality Collation Empty Comment Edited Do Drop Primary Battery Yes No Event_id 18A Editing Drop Date BTRI Number No 0a  

I notice cardinality 0, although there are some lines with the same date ..

forest index And check that the inquiry is actually using the index fast or not.

  Select event. * Force INDEX (events) from events where events.date & gt; = '2010-06-11';  

Comments