On Tue, Dec 19, 2017 at 6:05 PM, Simon Slavin <slav...@bigfraud.org> wrote:

> On 19 Dec 2017, at 4:15pm, Dinu <dinumar...@gmail.com> wrote:
> > 3) "Deleted" bit field - presumably the "soft delete" as you call it;
> If you do try this, the 'bit' column should be declared as INTEGER and the
> values stored should be 0 and 1.  SQLite is extremely efficient at
> storing/sorting these values.
>

"extremely efficient" is a bit exaggerated IMHO.

More space efficient definitely, see serial types 8 and 8 in [1], so only
the record's header section need to be consulted,
w/o the need to decode the whole record or decode the varint [2], thus more
cpu efficient too (since less to do), but the
record's page still needs to be paged in/out on reads/writes, and that's
like to dominate anyway. Just my guess though,
no hard data to back that up. Perhaps Ryan will measure the difference he
often does :) --DD

[1] https://www.sqlite.org/fileformat.html#record_format
[2] https://www.sqlite.org/fileformat2.html#varint
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to