How does YugaByte DB store NULL values internally?

This is relevant for sparse datasets. If I have 100 columns in a table, most of which are NULL, with N rows. Would N or 100*N values be stored in the storage engine?

In YugaByte DB we don’t store NULL values, so it would be closer to N than 100*N.

Note: a subtlety arises in handling the rows where most columns (except, perhaps, primary key columns) are NULL. This is why we also store a special hidden system column that indicates row existence.

Please refer to Persistence in YugabyteDB | YugabyteDB Docs for more information about how YugaByte DB maps the relational data model onto the underlying key-value store.

2 Likes