gpt4 book ai didi

ruby-on-rails - rails 2.0 : Why not use sqlite3?

转载 作者:IT王子 更新时间:2023-10-29 06:23:07 26 4
gpt4 key购买 nike

我一直在阅读一些关于如何开始使用 Rails 2.0 的教程。

(超时:天才网站名称的想法源于我刚刚打错的一个错字:“tutoRAILS。抱歉,回到我的问题。)

在我阅读的大部分教程中,似乎都鼓励使用 MySQL 而不是 sqlite3。这有什么原因吗,比如性能方面的原因?目前,我只是在我的 PC 上使用 InstantRails 测试 Rails,它们非常好,可以在其设置中包含 MySQL,但我一直在使用 sqlite3 制作我的实验性应用程序。我是否遗漏了 sqlite3 的一些重要警告,或者这只是其他人对 MySQL 的普遍偏好?

最佳答案

SQLite 是一个很好的引擎,但它仍然是进程中(或桌面)风格的引擎。 In Process 引擎在并发性方面具有固有的弱点,这使得它们从根本上成为基于服务器的引擎(如 MySQL)的糟糕选择,用于网站或其他可能同时进行大量写入访问的场景。

请参阅 SQLite 网站上的此页面:
http://www.sqlite.org/whentouse.html

SQLite usually will work great as the database engine for low to medium traffic websites

if ... you are thinking of splitting the database component off onto a separate machine, then you should definitely consider using an enterprise-class client/server database engine instead of SQLite.

关于ruby-on-rails - rails 2.0 : Why not use sqlite3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/357071/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com