SQLite Data Types In Context of Disk Space

datatypesdisk-spacesqlite

I would like to better understand which data types in SQLite take up more disk space. I've looked through official documentation but could not find anything in context of storage space.

Any guide link or a quick explanation will do.

Best Answer

I searched for "SQLite storage space" and this was the second link:

https://www.sqlite.org/fileformat2.html

All the information you could possibly want there.

You cannot exactly work out how much storage space a given data set will use because it depends on how it was created (deletes tend to cause fragmentation for example, which means more space than would be optimal). It does explain the row format though.

SQLite is not strongly typed though. So getting a row size is out of the question. Also most databases created in the last 30 years don't use a packed row format.