Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Innodb table with a index that looks at 3 columns.

  • ColA is integer and always has a value.
  • ColB is varchar and always has a value.
  • ColC is datetime and sometimes has a value (NULL).

My index appears to be looking at all records representing ColA,B,C (NULL or NOT NULL).

Is it possible to have the index only store ColC NULL values? This would shorten the index considerably (ie 27K to 1K).

share|improve this question
Do you mean that you need the index only for queries with WHERE c IS NULL? You never have other queries involving column c? – ypercubeᵀᴹ Apr 22 '14 at 18:10
Yes. Only when C IS NULL. – John M Apr 22 '14 at 18:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.