In my INNODB mySQL database I have some columns named like active, verified, disabled among others like name, surname.
To explain it better
Column Type Null Default
expires int(10) Yes NULL
verified tinyint(1) Yes NULL
disabled tinyint(1) Yes NULL
When a user logins into my page, I use PHP and check for example
if ($row['disabled']) { }
to know if he is disabled
( NULL or 1 ). (there are only these 2 possibilities).
For now, I set them as NULL but I thought if it is better to use 0 instead, knowing that 0 is empty in PHP too.
Concluding, my questions are two.
- Does thousands NULL records grow without a reason the DB instead of thousands 0 records?
- Does NULL or 0 affects PHP execution's performance differently ? If so, what is the best combination of mySQL and PHP to have for the requested checks as above?
Update
On my question number 1, my question is if NULL is actually null of size, otherwise is +3 bytes right?