开发者

SQLite open performance-issue

I am writing a desktop application under windows, I am using sqlite to store information, I created a db with index on string column, insert a lot of informations, the db size about 16M,

If I restart Windows, and open my application. It takes about 9-10 secodes to open the sqlite db. The code is as follow:

int nRet;
nRet = sqlite3_open16(szFile, &mpDB);
if (nRet != SQLITE_OK)
{
   LPCTSTR szError = (LPCTSTR) _sqlite3_errmsg(mpDB);
   throw CppSQLite3Exception(nRet, (LPCTSTR)s开发者_StackOverflow中文版zError, DONT_DELETE_MSG);
}
setBusyTimeout(mnBusyTimeoutMs);

Is it possible to accelerate it ?

Many Thanks!


YOu can use sqlite3 command line utility to check your database. Or you can recreate your tables with data (dump/restore).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜