与其他DBMS相比,MySQL是否会消耗大量资源? [英] Does MySQL consume significantly more resources compared to other DBMS?

查看:88
本文介绍了与其他DBMS相比,MySQL是否会消耗大量资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从mysql转换为NOSQL,SQLite等的趋势正在增长.我读过许多博客和文章,将mysql与其他类型的DBMS的速度进行了比较.但是,我相信mysql的速度不是问题,因为它确实非常快.但是问题更多与资源使用有关.由于mysql缓慢的查询,面对极端的服务器负载是很常见的.例如,与MySQL相比,Oracle的一个优点是可以减少与内存泄漏相关的问题.

  1. 与其他数据库(例如SQLite,非关系数据库,键/值数据库)相比,mysql确实消耗了大量资源(CPU和内存). 明显,我的意思是这是不对大型数据库不使用mysql的主要原因(以节省服务器成本).

  2. 如果为是"(至1),那么与Mysql相比,类似SQLite的类似系统可以更好地利用资源.

注意:考虑一个简单的系统,因为不需要mysql的高级功能.只是比较简单查询的性能.

解决方案

CPU和内存从来都不是原因,因为它们很便宜.问题出在I/O速度上. NoSQL数据库用于写密集型应用程序以及需要无模式数据库的应用程序中(因为在MySQL中更改表模式涉及重写表,这可能会非常慢).因此,需要进行一些折衷以优化磁盘操作,这通常会导致消耗更多的CPU,内存或磁盘空间.

另一个原因可能是悲观锁与乐观锁.这是另一个主题.

但是,由于与其他数据库相比,mysql是否确实消耗了更多的资源(CPU和内存)的问题"的答案是,因此,进一步讨论它毫无意义: /p>

There is a growing tendency for shifting from mysql to NOSQL, SQLite, etc. I have read many blogs and articles comparing the speed of mysql with other types of DBMS. However, I believe that speed is not a problem with mysql, as it is really fast; but the problem is more connected with resource usage. It is common to face extreme server load due to mysql slow queries. For instance, an advantage of Oracle over mysql is to have less problem associated with memory leaks.

  1. Is it true that mysql consumes significantly more resources (CPU and memory) comparing with other databases such as SQLite, Non-relational databases, key/value databases. By significantly I mean is it the main reason for not using mysql for large databases (to save server costs).

  2. If YES (to 1), what can be an estimate of better resource usage of a similar system like SQLite comparing with Mysql.

Note: Consider a simple system as advanced features of mysql is not needed. Just comparing the performance for simple queries.

解决方案

CPU and Memory never are the reason, as they are cheap. The problem is with the I/O speed. NoSQL databases are used in write-intensive applications, as well as in applications which need schema-less database (because changing the table schema in MySQL involves rewriting the table, which may be extremely slow). So some trade-offs are made to optimize the disk operations, which often lead to consuming more CPU, memory or disk space.

Another reason could be pessimistic vs optimistic locks. Which is another topic.

But since the answer to the question "Is it true that mysql consumes significantly more resources (CPU and memory) comparing with other databases" is NO, it is pointless to discuss it further :)

这篇关于与其他DBMS相比,MySQL是否会消耗大量资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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