Does MySQL consume significantly more resources co

2019-05-26 07:18发布

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.

2条回答
相关推荐>>
2楼-- · 2019-05-26 08:08

If you're only using "simple" queries, I don't think there's much of a difference regarding ressource usage between MySQL and e.g. Oracle. Those "professional" DBMS do a lot of "magic" regarding caching, prefetching and data maintanance. Of course MySQL does that as well, but it might not be as efficient for really complex databases and advanced queries.

Your choise of DBMS highly depends on what you're planning to do, especially if you're choosing between SQL/NoSQL/Key-Value/..., which are for completely different scenarios… that's not so much a question of memory and CPU usage.

查看更多
小情绪 Triste *
3楼-- · 2019-05-26 08:12

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 :)

查看更多
登录 后发表回答