Assuming two columns in a MySQL (MyISAM) table:
title VARCHAR(1500)
url VARCHAR(155)
I want to create a composite unique index on both columns. I know of the limiting length feature for too long columns (like my title
column). How does it play with compound indexes?
What I want is something like:
|--- url_value ---| + |--- title_value ---|
|--------155------| + |--------rest-------| <-- This should be the key length
By that I mean the key should have maximum length (I am using utf8 as encoding so I am limited to 333 characters allowed per column for unique indexes), where all 155 characters of column url
and 178 characters of column title
should be respected in the unique index. Sorry for the bad English. I tried to explain as well as I could. So bear with me if it seems confusing and I gladly will provide more information, if necessary.