[Lazarus] SQLite performance problem. Simple query takes too long.
Martin Schreiber
mse00000 at gmail.com
Fri Jul 29 15:13:51 CEST 2011
Am 29.07.2011 14:32, schrieb Howard Lee Harkness:
> I have established that the problem is not in SQLite, but has to be in
> my code somewhere. I suspect it is related to the transaction/commit
> problem I posted a few days ago, and I plan to track that down today
> if I can. I need to finish this application by tomorrow.
>
Sqlite manages transactions by file locks AFAIK. A not finished
resultset fetch also locks the file. So tsqlquery.packetrecords must be
set to -1. MSEgui sqldb version works with implicit transactions by
default which makes life with Sqlite3 easier.
On the other hand writing many records to the database should be
enclosed in a transaction otherwise there will be a slow filesync after
every write statement.
Martin
More information about the Lazarus
mailing list