[sqlite] When to call VACUUM - revisited

2012-07-04 Thread Hauptmann Peter
Hi List, I've read what I could find about the issue, this thread: http://thread.gmane.org/gmane.comp.db.sqlite.general/57770/focus=57775  pretty much gathers the positions, ranging from  - don't  - don't worry  - don't expect to much  - let the user decide The last is closest to my approach -

[sqlite] ATTACH 'file' to a :memory: database fails

2012-01-19 Thread Hauptmann Peter
Hi, I am trying to create an in-memory database and then attach an "real" database to it: sqlite3_open_v2(":memory:", ...); sqlite3_exec(db, "ATTACH c:\\temp\\sqlite\\small.sdb AS disk", ...); Attach fails with  Error 1: SQL logic error or missing database. All other 3 cases (attach disk db

[sqlite] Curious SQLite performance observation

2012-01-05 Thread Hauptmann Peter
This isn't a question as much as an observation that might be interesting for others, too, though I'd share. Having a table building a tree by each item referencing its parent:       // Table Items       CREATE TABLE [Items] (         [iRowID] INTEGER PRIMARY KEY,          [iParentRowID]

[sqlite] Truly exclusive access to SQLite file

2011-12-29 Thread Hauptmann Peter
Is there a way to exclusively *open* a SQlite database, so that (a) open fails if there is another connection to the database and (b) no other connections can be opened? I figured out already that I can get almost that by opening the database, setting PRAGMA locking_mode=exclusive; and doing a