[tahoe-lafs-trac-stream] [tahoe-lafs] #1864: turn off the AUTOINCREMENT feature in our use of sqlite?
tahoe-lafs
trac at tahoe-lafs.org
Sun Nov 18 06:41:53 UTC 2012
#1864: turn off the AUTOINCREMENT feature in our use of sqlite?
-------------------------+---------------------------
Reporter: zooko | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: undecided
Component: code | Version: 1.9.2
Keywords: sqlite | Launchpad Bug:
-------------------------+---------------------------
I just discovered this doc:
http://sqlite.org/autoinc.html
There are two different ways that sqlite can provide automatic "ROWID".
The standard one is a tad more efficient for sqlite to implement, the
other one — AUTOINCREMENT — makes sure that you don't get the same ROWID
twice in a row if you create a new row, then delete it, then create
another new row. (The AUTOINCREMENT one also has a different behavior if
you manually set your ROWID and you set it to the largest integer that
sqlite can handle.)
As far as I can think, we don't mind if the same ROWID is used to refer
both to a row that currently exists and a row that used to exist but does
no longer. (Because we never delete a row without also deleting or
updating all other references to it. Right?)
If I'm right, which I'm not sure of, then we could stop specifying to
sqlite that we need the AUTOINCREMENT style, and instead use the standard
and slightly more efficient style of ROWID.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1864>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list