Results 1 to 2 of 2
Apr 24, 2005, 07:35 #1
Which column type is more suitable?
The idea is to make the search on this table as fast and efficient as possible.
User A can choose a number from 1 to 8 (which would correspond to say 8 different colors) in column1, column2, column3 ...
User B would then be running a query looking for users which, for example, selected any one of the values 1,2,3,4,5.
My question is whether I should define this column TINYINT and then do a SELECT * FROM table WHERE column1 IN (1) AND column2 IN (2,3,4) AND column3 IN (2,5,6,7) etc.
define the column as SET ('1','2','3','4','5','6','7','8') - even though the user would only select one value, and then do SELECT * FROM table WHERE column1 & 1 AND column2 & 3 AND column3 & 8 etc.
Apr 24, 2005, 13:46 #2
- Join Date
- Jul 2002
- Toronto, Canada
- 53 Post(s)
- 2 Thread(s)