Dear all,

I experience some performance issues with SQLite.

I have an application that uses SQLite to store user data, including agenda
information. One of my client has a relatively big database (around 1.3Gb).
I have indexed the database so that the queries take a reasonable time to
execute.

In the general case, the complete update  process of the more demanding
tasks (handling of user action, search in database and screen refresh)
takes less than 1 second.

But, at very sparse moments, for reasons I cannot identify, one of my
clients experiences freezes in the application that can raise up to several
minutes ! After those freezes, the application continues to work normally

I instrumented my application to find the origin of the freeze. From this
instrumentation, I can guarantee that the time is spent in the database
request.

But what is strange is that executing exactly the same request, with
exactly the same parameters on exactly the same database content just
after, or just before the problem occurs does not cause any performance
issue.

I logged all information on what was happening on my client database (I
currently only have one client that encounters this strange behaviour), and
the only strange thing that I collected from his computer is the following
kind log from sqlite :

08-11-2015 (13h25): Exception: SQLiteDataBase : Error callback -> 27 :
delayed 25ms for lock/sharing conflict at line 39428
08-11-2015 (13h25): Exception: SQLiteDataBase : Error callback -> 27 :
delayed 75ms for lock/sharing conflict at line 39428

27 is the SQLIte error code, and the text located after is the sqlite
message.

The occurrence of such warnings do not seem to be direcly linked to my
problem, as they can appear on database access that do not suffer from
performance issues, and some database access with performance issues can
appear without those strange logs.

But, for me, those logs are strange because :
   - I never encountered them on other computers (even if it's true that I
did not pay attention to those logs before this problem was reported by my
client)
   - my application is supposed to be the only process to access the
database, and only one thread of my application is accessing the database.

So, does someone has an idea on what can cause such performance issues on
some sqlite DB requests ?

Thanks in advance,

Brice

PS: the problem is present at a client computer running a Windows 7 over a
relatively old computer (intel core 2 duo) with 4G ram. The version of
sqlite is the last one (because I upgraded hoping this would solve the
issue), but was also observerd with an older version of sqlite.

Reply via email to