I use the sqlite database.
When adding records, disk space is obviously used for non null data. But what about data records that contain null values?
Why Im asking is that I will have a large number of columns (50+) and millions of records that will contain null data and Im wondering if its the most efficient way of designing my database
In SQLite's record format, exactly one byte is need to specify that a value is NULL
.
If you normalize your database so that you have one record per non-NULL
value, you save those NULL
bytes, but you have additional overhead for the non-NULL
values.
SQLite's minimum record overhead is:
rowid
, andAdditionally, storing non-NULL
values in a separate table might require an index to get efficient lookups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With