What is the cost of using NULL in database columns?
I use MySQL and SQLite 开发者_Python百科often and plan on bringing more PostgreSQL into my workflow soon. With that in mind, what are the costs of using NULL in each database? I heard that MySQL adds an extra bit to each NULL column value to mark it as nullable.
This question was answered separately for PostgreSQL: How much disk-space is needed to store a NULL value using postgresql DB?
and for MySQL: NULL in MySQL (Performance & Storage)
But to recap they both use bitmask fields to mark nulls.
精彩评论