Just a general question. Is it better for database keep values or NULLs?
I have a commission field which calculates every day and is based on total amount value condition. Next date commission calculates on previous one and sums with total value. A commission can be 0.00 as well but not negative. Is it better to keep zero values or fill them as NULLs and use ‘ISNULL(comm, 0)’ in queries rather just ‘comm’?
Which is better for performance and DB capacity?
UPD: Performance is just good. I wonder if there any storage capacity difference when you have hundreds of users records for each day? Is NULL as EMPTY really that EMPTY or it takes some bytes when the storage value of 0.00 is less than NULL itself.
If the commission value is 0, you should keep it as 0 ,Not NULL. Why do you want to call the
ISNULLfunction to convert it back to 0 again ? that is wrong and it makes the future programmer who is going to handle your code , sit and think 2 days why it was designed so.Keep it simple and clean. Use 0.
from msdn,