Finally getting my SQLite3 code working, I'm experiencing awfully slow performance when writing individual data on OS X.


Linux (Ubuntu) is lightning fast, Win32 is.. tolerable, but OS X really crawls. I've tried both with built-in sources, and the new SQLite3 fink module. Same behaviour.

Is there something I should be aware of concerning this (is the OS X port somehow special?) or might it just be a 'bug' in the implementation? For a sample, writing 100 integers takes 30+ seconds!


Here's the code I'm using, as you see, it's not only about writing the data, I also need to remove any possible 'subtables' (not going into details here?) that might be on the way. Therefore, any write is a transaction such as:


"BEGIN;"
"DELETE FROM '%q' WHERE key LIKE ?1;" -- ?1 = "key.%"
"INSERT OR REPLACE INTO '%q' (key,val) VALUES( ?1, ?2 );" -- ?1=key (str), ?2=val (int)
"COMMIT;"


I do precompile the SQL in advance, that is not causing the delay. Any ideas??

-ak :)



Reply via email to