If the max length of DOCID is 11 you should declare it as varchar(12), or closer to the real max length than 50, otherwise you will be using a lot of space in the compound index that is not needed. The compound index is one of the rare places that the declared size of the field is actually used, as part of the metamorph index relies on fixed sizes for efficiency. That is also why you get the variable size warning when creating it.