I'm designing a database schema at the moment, but have a performance query.
Our table needs to have (at least) two flags, or boolean values. We can call these IsComplete and IsExportable. The obvious way to put these into a table is as two separate bit columns, but it occurred to me that we could put it into a byte column and use bitwise operators to query against it.
Which method would yield the best performance? Both flags will be queried often, and so filtering on them should be as fast as possible. Would an index on the byte column improve its performance?
One reason I like the byte column is because if another flag is required in the future, it can easily be made so. Whereas with separate bit columns, an additional column will need to be added.
For clarification, the database will be stored in SQL Azure. I suppose this might make some difference!