Answer the question
In order to leave comments, you need to log in
NULL in database fields, is it necessary?
Good day!
I read in one of the articles that using NULL in field values slows down performance. How true is this?
Answer the question
In order to leave comments, you need to log in
I think the answer depends very much on the DB you are using. Take and measure.
But, I think that the difference is extremely insignificant and will be overlapped many times over by the disk cache, query optimization, non-optimal data storage scheme, etc.
You have a stupid question under the right heading.
You either need NULL fields or you don't.
If needed, this theoretical deceleration will still be more effective than most bikes you can replace it with.
If not, why use them?
What's the difference?
for example, do you have any measurements, anything. it can be int if the measurement succeeded, or null if the measurement failed. and 0 is a perfectly valid value..
so you either need to allow null or you don't..
IMHO, NULL is a useful thing. Yes, they should be taken into account. But you yourself design the database and write queries - check the performance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question