Database file is inexplicably locked during SQLite commit

后端 未结 9 771
深忆病人
深忆病人 2020-12-31 12:17

I\'m performing a large number of INSERTS to a SQLite database. I\'m using just one thread. I batch the writes to improve performance and have a bit of security in case of

9条回答
  •  醉酒成梦
    2020-12-31 13:14

    Do you have Google Desktop Search (or another file indexer) running? As previously mentioned, Sysinternals Process Monitor can help you track it down.

    Also, what is the filename of the database? From PerformanceTuningWindows:

    Be VERY, VERY careful what you name your database, especially the extension

    For example, if you give all your databases the extension .sdb (SQLite Database, nice name hey? I thought so when I choose it anyway...) you discover that the SDB extension is already associated with APPFIX PACKAGES.

    Now, here is the cute part, APPFIX is an executable/package that Windows XP recognizes, and it will, (emphasis mine) ADD THE DATABASE TO THE SYSTEM RESTORE FUNCTIONALITY

    This means, stay with me here, every time you write ANYTHING to the database, the Windows XP system thinks a bloody executable has changed and copies your ENTIRE 800 meg database to the system restore directory....

    I recommend something like DB or DAT.

提交回复
热议问题