Christopher Thompson wrote:
>
> If I have a set with 10 items in it and I want to select a record if one or
> more of the items are found, what is the fastest way to do this?
>
> Is it better to create 10 TINYINT (or CHAR(0)?) fields and do "WHERE
> field1=1 OR field3=1".
>
> Or, is it faster to use the SET field type?
>
> Or, some other way?
Haven't played with SET myself but about other possibilities:
If you have to choose between char or tinyint, use first one. Handling
numbers is much faster than some strings. Using OR clause is slow. Use
spearate table as suggested before or maybe SET.
--
+----------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Tõnu Samuel |
| /*/ /*/ /*/ \*\_ |*| |*||*| tonu@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Tallinn, Estonia |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------+