On 03/17/2014 08:32 PM, Yi Wang wrote:
I inserted 2 billion records with only 1 column with name of "str_md5", the
value is the MD5 encrypted value of "mm"+rowid(such like MD5(mm121212...).

I didn't not create primary key for the only column b/c i am not sure it
would slow the speed of insert command. The whole insert of 2 billion
records took me over 18hours.

But when I hope to index the column with the sql command of

ā€¯create index tableMD5_idx on tableMD5(on str_md5);"

The index command ran for around 1 hour and then the error "Database or
disk if full" shown up.

FYI: The sqlite file only contains that only 1 table with 1 column. The
size of the DB file took around 87G disk space.

And the disp space is still 50G more free space to reach full. So I am not
sure whether it's the space problom b/c according to my previous
experience, the index command would increase around 1/3 size of the currnet
DB file (I took a test DB with one hundres million records which took abour
7G space, and after the index command the final size reach to 9G around.)

So any ideas? Thanks in advance.

In order to create a large index, as well as the N bytes of space required to store the index itself in the database, SQLite requires roughly 2N bytes of free space wherever temp files are created on your system to work with. It uses this space as temporary storage to sort the index entries.

Dan.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to