SQLite Forum

Column ordering and space saving
Login
SQLite does not pad or align columns within a row. Everything is tightly
packed together using minimal space.  Two consequences of this design:

  1.   SQLite has to work harder (use more CPU cycles) to access data
       within a row once it has that row in memory.

  2.   SQLite uses fewer bytes on disk, less memory, and spends less time
       moving content around because there are fewer bytes to move.

We believe that the benefit of #2 outweighs the disadvantage of #1, especially
on modern hardware in which #1 is operating out of L1 cache whereas #2 is
using main-memory transfers.  But your mileage may vary depending on what
you store in the database file.