How do I model a schema such that I avoid using space

Say if I have a message schema, & I need a field replyToMessageId which holds the id of the message to which this message instance is supposed to be a reply/comment of, then for multiple messages with this field being null, wont it waste bits used to represent null? Is null value stored? & how to model such data better?

In ScyllaDB, fields for which you don’t set a value, are simply not stored on disk. Note, that setting a field to null is different than not storing a value at all. A null field still takes some space (it is a cell tombstone).

3 Likes