MySQL index on VARCHAR(1000) -
a varchar(1000)
column included in where
clause e.g.
where propertyvalue in ('sample, ...')
the values unique not guaranteed/constrained be.
i want index , wondering best approach is. realise indexing column make inserts slower.
would storing hash of value char(64)
, indexing , searching on faster? thinking fixed size value more suitable indexing.
i using 5.1 , innodb
the simplest approach use partial index:
create index on [...] propertyvalue(100) [...]
so long first 100 characters (in example) of columns reasonably distinctive, more sufficient make index work.
Comments
Post a Comment