本文介绍了SQLite作为低流量站点的生产数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用SQLite作为一个网站的生产数据库,可能会接收到20个同时的用户,但潜在的峰值可能是其许多倍数(因为该网站将在开放互联网和总有一种可能性,人们会在某处发布一个链接,可能会驱使许多人同时在网站上)。



SQLite是可能吗?



我知道这不是一个理想的生产场景。我只是问这是否是一个现实可能性的范围。

解决方案


SQLlite,你可能很好,最初使用它。



SQLlite的作者解决了这个问题,围绕使用SQLite生产Web应用程序的一些更独立的注释。

By all means continue to develop against SQLlite, and you're probably fine to use it initially. If you find your application has more users down the track, you're going to want to transition to postgres or mysql however.

The author of SQLlite addresses this on the website:

So I think the long and short of it is, go for it, and if it's not working well for you, making the transition to an enterprise class database is fairly trivial anyway. Do take care over your schema however, and design your database with growth and efficiency in mind.


Here's a thread with some more independent comments around using SQLite for a production web application. It sounds like it has been used with some mixed results.


Edit (2014):

Since this answer was posted, SQLite now features a multi-threaded mode and write ahead logging mode which may influence your evaluation of it's suitability for low-medium traffic sites.

Charles Leifer has written a blog post about SQLite's WAL (write ahead logging) feature and some well considered opinions on appropriate usecases.

这篇关于SQLite作为低流量站点的生产数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 18:31