Hi Michael,

Michael Hunley wrote:

Hi,
I am currently using SQLite v 2.8.13 for a commercial product for Palm Handhelds. I am noticing some performance issues; most notably when I do a database validate() to verify my integrity at app open and close. I see that version 3.0.8 has some code optimizations, but am unsure if upgrading from the 2.8 series to the 3.0 series is just a drop in or if my code will need to change. Can anyone tell me if the API has changed in a notable way?

The API has changed slightly. Mostly it's a matter of changing the sqlite_ prefix to sqlite3_, but you also need to change the name of the structure which you pass to sqlite3_step, and a few other changes. I can send you two pieces of code that show "before" and "after" use if you contact me off-list.



Also, is my performance going to improve with the 3.0.8 over 2.8.13? If not, what about 2.8.15?

I experienced a performance increase when I moved from 2.8.13 to 2.8.15, but a performance decrease when moving from 2.8.13 to 3.0.7. A recent thread on this list deals with this perceived decrease in performance (the thread is from around 5 October 2004, entitled "Degradation of performance in SQLite3?" -- you can find it in the archives, which are linked to from www.sqlite.org). PLEASE note that some people seem to experience performance *increases* when going from SQLite 2.8 to 3.0, so Your Mileage May Vary.


Basically, Dr. Hipp said back then that SQLite 3 uses less disk space (and so fewer disk reads) at the expense of using more CPU cycles. This may or may not give you a performance increase, and in my case, it gave me a performance decrease, probably because the databases I have are so small that the operating system (Linux in my case) can map most of the file into virtual memory both for 2.8 and 3.0, and so the usage of more CPU cycles in 3.0 gives an overall performance decrease.

However, there are several other good reasons to move to SQLite 3 than performance issues, and I'm sure that others can fill in the details.

HTH.

Cheers,

Ulrik



Reply via email to