5 ms·
How does the language you're using handle datatypes? Will your equivalency test assume Null == False or will it do some internal conversion. libmysqlclient doe
by cd34 15y ago
How does the language you're using handle datatypes? Will your equivalency test assume Null == False or will it do some internal conversion.
libmysqlclient does some unique things regarding numeric fields - converting to the ascii representation, requiring the language to convert it back to a numeric representation (if the programming language you use supports typing).
It does the same with boolean versus enum versus tinyint fields. If you only have one tinyint/boolean field and are using MyISAM, you're sending a byte anyhow. You won't save 7 bits being sent across the wire because you used a 1 bit field.
Each is transmitted as a single byte in mysqlclient (at least in 16) and the bit savings are reflected on disk, not communicating that result across the wire.
The overhead you might save is based on how the programming language you use interprets and converts the data from libmysqlclient.
The other aspect to consider is the guy that needs to maintain the code after you. Deleted (0|1) or (Null|1) might yield some confusion. Does 0 mean the record is deleted and needs to be removed or does 1 mean it is deleted? Null might mean the field is never set. True/False or Y/N might make more sense for maintenance down the line.