Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Full-Text Search on SQLite (michaeltrier.com)
5 points by ra on July 15, 2008 | hide | past | favorite | 2 comments


Can anyone give a reason why not to use SQLite for simple web sites that don't require lots of db writes?

I read this thread: http://news.ycombinator.com/item?id=38287

I'm wondering if anyone has anything to add, now that another year has passed.

This: http://www.sqlite.org/whentouse.html seems to indicate that it shouldn't be a problem.

I'm currently using PostgreSQL with sphinx-search, which works great but I'm always looking for opportunities to reduce moving parts in my applications.

Thanks very much indeed!


The bar for "lots" isn't that high with SQLite. The primary difference is that Postgres does Multi-Version Concurrency Control (MVCC), which allows readers to continue accessing the 'current' version of some data while the 'future' version is being written, and that Postgres' locking occurs at the row and table level. With SQLite, readers are locked out of the entire database while a write is occurring, and everyone else's cache is invalidated following a write.

Postgres may also be faster for non-trivial reads; it has more options open to it (hash joins versus sort-and-merge versus subqueries, for instance) and its planner does a pretty good job of selecting the right strategy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: