I have a question, on which of these two methods would result in better performance.
I have a table with 1 million rows, with one of the fields being
profile_category set('1','2','3','4','5') NOT NULL default ''
it is indexed.
When I search that table, I currently use FIND_IN_SET.
I was thinking however, it may be better to build a new table containing 6 fields (id - autoincrementing primary key - and one field per possible value as boolean fields - or tinyint(1) )
I could then use a script to insert one row for each possible combination
In my table with 1 million rows, I would change my set field to just a int field.
When I search then, I could first do a small quick query on the combinations table to get the id, when use the id in my where on my large table.
In your opinions is this a solid method? Is there a better one? Should I make it two seperate queries, or do a JOIn query instead?
Much thanks