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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -