SQLite does not start in a separate process. Thus, you actually have no additional overhead from IPC. But the IPC overhead is not that big, especially for example UNIX sockets. If you need several authors (more than one process / thread writing to the database at the same time), the overhead of locking is probably worse, and MySQL or PostgreSQL will work better, especially if they work on the same computer. The underlying SQL supported by all three of these databases is the same, so benchmarking is not so painful.
As a rule, you do not need to perform the same type of debugging in SQL statements, as is done in your own implementation. SQLite works and is pretty well debugged. It is very unlikely that you will ever have to debug "OK, this line exists, why doesn't the database find it?" and track the error when updating the index. SQL debugging is completely different from procedural code, and in fact this only happens for fairly complex queries.
As for debugging your code, you can pretty easily centralize your SQL queries and add tracing to log running queries, the results you get, etc. Python's SQLite interface may already have this (not sure, I usually use Perl). It will probably be easiest to make your existing table class a wrapper around SQLite.
I would highly recommend not reinventing the wheel. SQLite will have far fewer errors and save you a ton of time. (Perhaps you should also take a look at Firefox for a fairly recent switch to using SQLite to store history, etc., I think they got some pretty significant speedups from this).
Also, a well-optimized implementation of SQLite C is probably a little faster than any pure Python implementation.
source share