Hi Ron,

> I have noticed that when I create a database and do a simple INSERT, (using
> the sqlite3 binary), there is an appreciable delay (1-2 seconds) before
> sqlite3 returns to the prompt.  When doing SELECT there is no delay.

Mmm, can't say that I have seen any strange delays on the arm platform, albeit 
that it obviously *is* a bit slower than i386 ;). But seriously, given that 
we're talking about a newly created db, a fairly simple table with no 'weird' 
triggers etc, then a plain insert is not that much work and should return 
almost instantly.

It might be due to some locking issues, but you didn't mention accessing the 
db from multiple processes / threads. Also, your filesystem / kernel might 
have issues (re)opening the file readwrite. You could use something like 
strace to see what exactly is happening during the delay, given that this 
tool is available on the platform, but if it isn't you could built it.

> I have not noticed this on my Windows or Linux machines (x86).

Me neither.

> Is this possibly because of not using transactions?

Not likely.

> The device is storing the database on a hard-disk, so it shouldn't
> have to do with paged RAM or something.

I wouldn't jump to the same conclusion when it was anything else than a simple 
insert......, but anyway. The only additional thing that comes to mind is 
that you were seeing a select coming from cache and that the insert triggered 
a powerup of the drive......? Again, something like strace could tell you 
what's happening.

> Thanks for any suggestions, and thanks again for the good instructions!

You're welcome, good luck !




-- 
Best,




Frank.

Reply via email to