Runar Tenfjord added the comment:
Multi threading:
According to http://www.sqlite.org/cvstrac/wiki?p=MultiThreading
we need to keep a connection for each thread to support multi threaded
access to the database.
I came across this when deploying an application in a multi threaded
environment
Runar Tenfjord added the comment:
By utilizing triggers on inserts and deletes it is possible to
keep track of the size and speed up __len__ by 10 x.
SQL:
CREATE TABLE IF NOT EXISTS info
(key TEXT UNIQUE NOT NULL,
value INTEGER NOT NULL);
INSERT OR IGNORE INTO info (key,value) VALUES