0

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)szError, DONT_DELETE_MSG);
}
setBusyTimeout(mnBusyTimeoutMs);

Is it possible to accelerate it ?

Many Thanks!

2
  • Have you shutdown your database correctly?
    – J-16 SDiZ
    Nov 24, 2010 at 8:31
  • How can I judge whether I closed the db correctly?
    – sxingfeng
    Nov 24, 2010 at 8:44

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.