为什么用 cassandra 而不是 mysql 使用 nosql?

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

问题描述

我在大型数据库(数百 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.

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)