为什么 nosql 用 cassandra 而不是 mysql? [英] Why nosql with cassandra instead of mysql?

查看:29
本文介绍了为什么 nosql 用 cassandra 而不是 mysql?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大型数据库(数百 GB)上工作,而 Mysql 现在或多或少地让我感到满意.我对 cassandra 的发布犹豫不决.

I work on large database (hundreds of GB) and Mysql now gives me more or less satisfaction. I hesitate to cassandra on launch.

之前什么都想知道,所以这种DBMS NoSQL应该比MySQL快吧?

What I want to know everything before, so this kind of DBMS NoSQL is supposed to be faster than MySQL?

几点:

  • 一行上列数的变化在Mysql中,它们都必须事先定义好.列设置在表的结构中.在 NoSQL 中,它们可以是多种多样的.固定结构有真正的不同性能吗?为什么?

  • The change in the number of column on a row In Mysql, they must all be defined in advance. The columns set in the structure of the table. NoSQL in, they can be varied. There is real difference performance on a fixed structure ? and why ?

不要让关系有利于表现.好的,但我没有义务制作关系表mysql.我使用聚合表,即表仅包含来自其他表的数据,我防止接头太贵.如果我使用这个模型,再次出现什么级别的性能差异在 MySQL 中?举个例子,http://www.rackspacecloud.com/blog/2010/05/12/cassandra-by-example/在消息 USERLINE pusher 中插入 X 次关注者.我可以在 MySQL 中做到这一点.

Do not make the relationship is beneficial for performance. Ok but I am not obliged to make a relational table Mysql. I use aggregated tables, ie tables that contain only data derived from other tables, I to prevent the joints which are too expensive. Again what level performance differences if I use this model in Mysql? To take one example, the author of http://www.rackspacecloud.com/blog/2010/05/12/cassandra-by-example/ insert X number of times the follower in the message USERLINE pusher. I could do that in MySQL.

可扩展性、可扩展性、可扩展性......我喜欢它,cassandra 是否允许我将数据存储在不同的服务器上(没有 SAN)?我不是在说复制,我说的是跨多个物理服务器的单个 NoSQL 服务器.

Scalability, scalability, scalability ... I like it, do cassandra allow me to store my data on different servers (without SAN) ? I am not talking here of replication, I speak of a single NoSQL server across multiple physical server.

实时计算.MySQL 提供了像我这样的函数,如 SUM、AVG ......这对于避免我在其他表中重新聚合我的数据非常有用.我没见过等价的卡桑德拉?

Live at the calculations. MySQL provides functions like me as SUM, AVG ... that are very useful to avoid me to re-aggregating my data in other tables. I have not seen equivalent cassandra ?

索引呢.在 Mysql 上,我将几个字段合二为一.例如,我的表在多个列上有一个主键,我选择的是功能性的.cassandra 上怎么写呢?每行的单个标识符的连接?我想我还没有完全掌握索引的管理.是否为集成或上游重新计算?

What about the indexes. On Mysql I index several fields in one. For example my tables have a primary key on multiple columns and I select are in functionaly. cassandra on how to write it? The concatenated for a single identifier for each row? I think I have not completely grasped the management of indexes. Are recalculated for the integration or upstream?

异步请求.在我看来这是一个错误的论点,Mysql 可以通过 INSERT/UPDATE LOW_PRIORITY 完成.

The asynchronous requests. A false argument that it seems to me, Mysql can be done with INSERT / UPDATE LOW_PRIORITY.

我想我会四处走动.多谢赐教.

I think I go around. Thank you to enlighten me.

推荐答案

我真的不明白为什么人们将 Cassandra 和 MySQL 之类的数据提供者放在一起进行比较——你在这里真的是在比较苹果和橘子.

I really don't understand why people compare data providers like Cassandra and MySQL together -- you're really comparing apples and oranges here.

是的,在某些情况下,NoSQL 解决方案可以提供比 SQL 更好的性能.但是不要忘记他们提供这种速度的原因——他们放弃了一些您在 SQL 中经常认为理所当然的检查.例如,您不会在 NoSQL 系统中看到诸如事务之类的东西,也不会拥有作为 SQL 系统的一部分获得的那种连接和数据聚合功能.在数据一致性方面,您得到的保证很少.

Yes, NoSQL solutions can give better performance than SQL in some cases. But don't forget the reason they provide that speed -- they give up on several of the checks that you often take for granted in SQL. For example, you will not see things like transactions in a NoSQL system, nor are you going to have the kinds of joins and data aggregation features that you get as part of a SQL system. You get very few guarantees with respect to consistency of the data.

对于 99% 的应用程序来说,花费时间和精力是不值得的.如果你是 facebook 或 twitter,你有大量的非结构化数据,你不在乎是否真的在混乱中丢失了一些数据,或者在插入数据后何时可用数据存在延迟,NoSQL很好.但是,对于绝大多数应用程序,您仍应坚持使用 SQL.

For 99% of applications it's simply not worth the time and effort. If you are facebook or twitter, where you have enormous quantities of unstructured data, where you don't care if you actually lose some data in the shuffle of things, or have delays with respect to when data is available after it is inserted, NoSQL is just fine. However, for the vast majority of applications, you should still be sticking with SQL.

至于可扩展性,如果像 Stack Overflow 或 Ebay 这样的大型网站可以在 SQL 之上运行,我不明白为什么您的应用程序不能在 SQL 之上运行.

As for scalability, if an enormous site like Stack Overflow or Ebay can run on top of SQL, I don't see why your application cannot run on top of SQL.

这篇关于为什么 nosql 用 cassandra 而不是 mysql?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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