Kevin Xu wrote:
> The SQLite page_size is on its default setting (1024b), while I have
> not dug out the details on my specific SSD, a cursory Google search
> reveals SSDs report a 512b sector size for compatibility reasons while
> internally implementing a different native sector size (which is
> unintuitive since SSDs aren’t even cylindrical, thus no sectors).

I've heard of SSD erase block sizes that could by anywhere between 2 KB
and 512 KB.  In any case, having a database page size larger than the
device's block size does not hurt for huge databases such as yours, and
is slightly more efficient regardless of storage technology, so you
should just set the page size to 64 KB.

> I do not think I defined an explicit primary key. Thus, if I use
> “WITHOUT ROWID”, it wouldn’t work. (I think a rowid performs better
> than a composite primary key that I will attempt to define, please
> correct me).

A WITHOUT ROWID table is stored in the order of its primary key; a rowid
table is stored in the order of its rowid (which is not necessarily the
same as the primary key).  When inserting into a rowid table and using
an autoincrementing rowid value, the database can just append the record
at the end.  If you have a WITHOUT ROWID table or some index, any non-
incrementing values would have to be inserted somewhere in the middle.


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

Reply via email to