Okay, So heres the setup:
a table with `groups` - relatively small amount, lets say a maximum of 16 for the hell of it.
a table of `users` with the field `groups`
the groups table has an id -> auto_incrementing
the users table has a field `groups` which is a bitwise interpretation of the groups.
UPDATE users SET groups = pow(2,X) + pow(2,Y) + pow(2,Z) for example....
Anyways, I want to make this as efficient as possible.
Right now the id field for the groups is int(1) unsigned
the groups field in the users table is int(4) unsigned.
I have no idea what the maximum amount of groups i can have, which field is going to limit expansion, and whether using int instead of a bit field is a bad idea for optimization purposes.
Relational Bit Fields
Moderator: General Moderators
optimize the overall size that each row of the database takes up...
I dont really have to worry about the read / write speed.... so really its just the physical size of the database to deal with.
I was using a relational table, but I'd rather use bitwise operators - for whatever reason...
Basically the answer to your question is cause I've never used bitwise relations, and I want to try it out
I dont really have to worry about the read / write speed.... so really its just the physical size of the database to deal with.
I was using a relational table, but I'd rather use bitwise operators - for whatever reason...
Basically the answer to your question is cause I've never used bitwise relations, and I want to try it out