Sqlite还是MySql?如何决定? [英] Sqlite or MySql? How to decide?

查看:186
本文介绍了Sqlite还是MySql?如何决定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关如何决定使用哪两个规则的任何好的经验法则。



如果你接管一个Sqlite数据库,

解决方案

他们的功能集不是在更大,如何决定是否坚持使用它或移动到MySql?全部都一样。 Sqlite是一个没有网络功能的嵌入式数据库(除非你添加它们)。



如果需要




  • 网络访问 - 例如从另一台机器访问;

  • 任何真正的并发度 - 例如,如果您认为您可能想要同时运行多个查询,或运行具有大量选择和一些更新的工作负载,希望他们顺利等。

  • 很多内存使用,例如,在32G内存中缓冲1Tb数据库的部分内容。



    • 您需要使用mysql或其他基于服务器的RDBMS。



      请注意,MySQL不是唯一的选择,有很多其他可能更适合新的应用程序(例如pgSQL)。



      Sqlite是一个非常非常好的软件,但它从来没有声明做任何这些RDBMS服务器做的事情。它是一个小型库,它在本地文件上运行SQL(使用锁定,以确保多个进程不会将文件拧上)。



      此外,如果你不能自己正确选择,你可能需要雇佣你的团队中的某人谁可以。


      Any good rules of thumb on how to decide which of the two to use?

      And, if you take over an Sqlite database, and the system is expected to "get much larger", how to decide whether to stick with it or move to MySql?

      解决方案

      Their feature sets are not at all the same. Sqlite is an embedded database which has no network capabilities (unless you add them). So you can't use it on a network.

      If you need

      • Network access - for example accessing from another machine;
      • Any real degree of concurrency - for example, if you think you are likely to want to run several queries at once, or run a workload that has lots of selects and a few updates, and want them to go smoothly etc.
      • a lot of memory usage, for example, to buffer parts of your 1Tb database in your 32G of memory.

      You need to use mysql or some other server-based RDBMS.

      Note that MySQL is not the only choice and there are plenty of others which might be better for new applications (for example pgSQL).

      Sqlite is a very, very nice piece of software, but it has never made claims to do any of these things that RDBMS servers do. It's a small library which runs SQL on local files (using locking to ensure that multiple processes don't screw the file up). It's really well tested and I like it a lot.

      Also, if you aren't able to choose this correctly by yourself, you probably need to hire someone on your team who can.

      这篇关于Sqlite还是MySql?如何决定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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