Dave Gierok <[EMAIL PROTECTED]> wrote:
> It looks like the size of a Sqlite DB ends up being much larger 
> (more than 2x) than size that I calculate for its data set.
> 
> A simple test shows that when creating one table with one integer 
> column and filling it with 10000 rows, I get a DB size of 92KB 
> instead of what I'd expect to be around 40KB plus some small
> overhead for the table definition.  This seems to scale linearly
> as I increase the amount of data in the DB.

SQLite stores 64-bit integers, not 32-bit as you suppose.  And
each row also stores a 64-bit integer rowid in addition to the
data.  So that it fits in 92KB instead of the (naively expected)
160KB suggests that SQLite is actually doing a reasonable job of
compressing the data.

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to