Hi all,
This is not urgent, but, I am looking for ideas. So I was basically writing a table [ID as rowID, K as integer (4B uint, although that's not defined in SQLite) ] with like One billion rows in SQLite. The ID is sparse and inserted in increasing order. K is simply incremented by one per row insert.
Now I am running into delima. Writing one billion rows is slow when I already used their recommended Prepare one time, and then, Bind-Step-Reset routine.
I need rowID index for fast Min, Max, and access.
============
So, I was thinking just write 4bytes per row into a flat file instead since it is faster this way. I would just write junk for the ID that is not interesting. However, that would use tons of HDD space as ID is sparse. We are looking at ID ranged from 0 to 40Billion where there are One Billion of them are inserted into the table. If I just waste spaces, for uncessacry IDs, I would be writing a 40Billion * 4B Uint file. That's just insane.
Is there any alternatives? I liked the SQLite rowID performance, but, insertion is too slow. Any thought?
Thank you.
Add your 2¢