sqlitecache: hist, create index on Date column
sqlitecache: quote, USE the transaction

Facepalm.