Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is SQLite suitable for web site usage

Tags:

sqlite

web

I have a database of 50MB size in SQLite 3. All db objects are accessed through a web service. Is SQLite a good choice for an concurrent online usage of about 500 parallel users.

NOTE: Users will use same tables but not same rows. Each user can see/update/delete only his data.

like image 975
Gad D Lord Avatar asked Oct 05 '10 20:10

Gad D Lord


People also ask

What is the main limitation of SQLite?

SQLite does not support joins containing more than 64 tables. This limit arises from the fact that the SQLite code generator uses bitmaps with one bit per join-table in the query optimizer. SQLite uses an efficient query planner algorithm and so even a large join can be prepared quickly.

Does SQLite work on browser?

It is for users and developers who want to create, search, design and edit databases. SQLite browser uses a general spreadsheet-like interface, and there is no need to learn complicated SQL commands. It is a tool that is used by both developers and end-users, and for that reason, it has to remain as simple as possible.

For what purpose is SQLite used for?

SQLite is used to develop embedded software for devices like televisions, cell phones, cameras, etc. It can manage low to medium-traffic HTTP requests. SQLite can change files into smaller size archives with lesser metadata. SQLite is used as a temporary dataset to get processed with some data within an application.


2 Answers

SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99.9% of all websites). The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic.

(Source)

like image 181
Nifle Avatar answered Dec 08 '22 09:12

Nifle


According to wikipedia SQLLite will fail a write if there are any concurrent accesses to the database. This alone makes me think it is not usable for 500 concurrent users.

Unless there are hardly any updates going on that is. I think 500 concurrent users is certainly enough to warrent a full blown DBMS.

Note, it looks like that wikipedia article is wrong (pretty common on wikipedia really). Anyways, if those 500 users are going to be updating a lot, I would still be weary of 500 concurrent users with 0 concurrent writes. While the numbers in the thread referenced by Nifle sound good, those are most likely from tests which are engineered to make sqllite look good. I doubt you will get the same milage with all queries, all table sizes, all cache states, etc.

like image 31
tster Avatar answered Dec 08 '22 08:12

tster