I'm not the expert on this, but there is an overhead to consider in
terms of the record header.
http://www.sqlite.org/fileformat.html

one question - the table storing the integers - was it created with one
of the data values as the primary key ? 
If not then you'll have a rowid in each row too. (search for 'alias' in
the page below)
http://www.sqlite.org/lang_createtable.html


Owen


-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kelly Jones
Sent: Wednesday, November 04, 2009 2:52 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Storing 3-byte ints efficiently

I imported a file with ~16.8M rows of 2 integers each (~33.6M ints
total) into an SQLite db, no indexes. The ints are all < 16777216 (3
bytes)

At 3 bytes/int, I thought the resulting db would be ~100M in size
(plus some overhead), but it was actually 274M.

How do I make sqlite3 store ints efficiently?

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to