0

I usually try to use the correct datatype to store information.

For example:

tinyint(1) to store boolean. Why not use varchar(1) or even int(11) and bigint?

Works with user_id instead of nick name.

Would I lose space in my disk, memory, or is it just slow?

RGS
  • 4,062
  • 4
  • 31
  • 67

1 Answers1

0

These questions are answered elsewhere. MySQL char vs. int

What is the difference between tinyint, smallint, mediumint, bigint and int in MySQL?

varchar will use less storage than char for the same length, but varchar will have more overhead (slower performance). bigint uses more storage than tinyint.

For boolean, consider using bit instead. What is the difference between BIT and TINYINT in MySQL?

Community
  • 1
  • 1
Daniel
  • 542
  • 1
  • 4
  • 19