Roger Binns wrote: > > Sebastian Arcus wrote: > >> Hi and thanks for the suggestion. I did as you advised and ran 'vmstat >> 1' in a terminal. Very little activity - maybe 20-40kb every 6-7 seconds >> on the bo - pretty much nothing on bi. Also, zeros all around on so/si. >> > > That rules out disk activity as the cause. Consequently I would pronounce > your problem to be caused by whatever layers you have on top of SQLite. > Another useful tool on Linux is ltrace which shows library calls. Note > however that it can't show calls made to libraries loaded via dlopen which > is usually most of them. > > >> People seem to be talking about operations on tens to hundreds of >> thousands of records, and performance in some circumstances close to >> MySQL - it just seems all very far off from waiting 10 seconds on a >> single UPDATE or INSERT SQL statement. I must be doing something wrong. >> > > It will be the layer above SQLite causing the problem. Disks are orders of > magnitude slower than memory. The performance choke point is having to do > syncs to ensure data is on disk, but both SQLite and database servers have > to do that. SQLite then also benefits from running in the same process as > whatever is using it, omitting network round trips. In general the way > servers win is by dedicating gigabytes of memory to caching but SQLite can > also a lot if you increase various defaults. > > Thanks Roger. I guess then I'm no further with this. I'm starting to wonder if the mozStorage library has such a small developer-user base (outside the actual Mozilla apps and Firefox/Thunderbird extensions) that I shouldn't expect to be able to get to the bottom of the thing. The strangest thing is that I remember few years back I've hit an almost identical road-block with a Microsoft Access database. After working fine for years - after some Windows update - it started taking 3-4 seconds for one particular UPDATE operation. Never got to the bottom of that either :-) I had to include a progress bar on the form, and wait 4 secs every time when attempting to save the record.
Thanks again for your suggestions. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users