客户端 - 服务器的SQLite [英] SQLite for client-server

查看:118
本文介绍了客户端 - 服务器的SQLite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Stackoverflow上看到了一些SQLite的性能问题,但重点是网站,我正在考虑在客户端 - 服务器场景中使用这个DB:

I've seen a couple of SQLite performance questions here on Stackoverflow, but the focus was on websites, and I'm considering using this DB in a client-server scenario:


  • 我希望目前有一个服务器有1-10个客户端,将来可能会增加到50个或更多。


  • 该数据库将位于服务器进程之后(即:不通过网络直接访问数据库)

使用SQLite会使应用程序的响应速度低于使用PostgreSQL吗?我的直觉告诉我,对于这些负载应该是确定的,但也许有人在这种情况下有一些实际经验。

Would using SQLite make the app less responsive as opposed to using PostgreSQL? My intuition tells me that it should be ok for these loads, but maybe someone has some practical experience with this kind of scenario.

推荐答案

我使用SQLite的主要客户端/服务器产品使用〜10并发用户和我深感遗憾的决定。在我看来 - 由于其精细的锁定粒度,PostgreSQL比SQLite更适合客户端/服务器场景。

I did use SQLite for a major client/server product used with ~10 concurrent users and I deeply regret that decision. In my opinion - PostgreSQL is much more suitable for client/server scenarios than SQLite due to its fine locking granularity.

只要有人需要写东西,整个数据库都被锁定,你根本无法得到很多东西。

You simply can't get very far when the entire database is locked whenever someone needs to write something ..

我喜欢SQLite非常(我甚至写了一个商业实用程序比较SQLite数据库 - SQLite比较,但我不认为它适合帐单,当你有客户端/服务器场景。

I like SQLite very much (I even wrote a commercial utility for comparing SQLite databases - SQLite Compare but I don't think it fits the bill when you have client/server scenarios.

甚至SQLite的作者它应该用来替代自定义文件格式,而不是一个完整的数据库服务器。我希望我的建议更多严重..

Even SQLite's author says that it should be used as a replacement for custom file formats and not as a full blown database server. I wish I took his advice more seriously..

这篇关于客户端 - 服务器的SQLite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆