Sorry for bumping a rather old thread, but this doesn't seem to work well for large number of boolean values...
Ie This works fine when I have a low number, but once we have a larger number (30ish), the int values grow to silly sizes and the join to the table holding the string values impacts performance in a silly way.
With the join to the large boolean int value a full query takes about 90 seconds, with it joined to the table key fields, int starting at 1 and increasing by 1, it takes 20 seconds.
I have gotten around this by passing the seperate values searched for as an XML string, but would like to know the reason behind this performance hit?
Cheers,
Paul.