Thanks for the quick answer. I'm working on a game where memory is a precious commodity, and we use a :memory: db. Is there a relatively easy way to do any of:
- Make Sqlite use 32-bit floats instead of 64-bit doubles. Our DB contains a lot of floating point data. - Make Sqlite use 32-bit ints instead of 64-bit ints. - Anything else that would reduce the size in memory? I previously asked about setting the cache size to do this but it appears that doesn't do anything for :memory: databases (which makes sense). Thanks, Dave Gierok -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 11:38 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Sqlite DB file sizes 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] ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------