Indexed key vs indexed separate columns, which one is faster ?

Posted by Jerry on Stack Overflow See other posts from Stack Overflow or by Jerry
Published on 2011-03-10T00:05:08Z Indexed on 2011/03/10 0:10 UTC
Read the original article Hit count: 206

Filed under:
|
|

In MYSQL, from a pure performance perspective, if I have a table with large amount of data with 10/1 read/write ratio. is it faster in read/write performance to have 4 search criteria in separate columns and all indexed or have them combined in to one single string acting as a key and store in one indexed column ?

e.g. say this table with 5 columns, first name, last name, sex, country and file where the first four columns will ALWAYS be given as a part of search parameters in a search or have a table with two columns, key and file. where the value of key can be john-smith-male-australia ??

I don't quite get the pros and cons. the point I try to stress is the fact that all parameters will be given.in a search.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql