mongoDB vs mySQL - 为什么一些在某些方面比另一个更好 [英] mongoDB vs mySQL -- why one is better than another in some aspects

查看:173
本文介绍了mongoDB vs mySQL - 为什么一些在某些方面比另一个更好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对数据库真的很新,并且对一些高水平的基本知识感兴趣。我已阅读这个精彩的SO文章。我下一个在某些情况下比另一个更好,但不知道为什么。

I am really new to database and am interested in some high level basic knowledge. I have read this wonderful SO post. I under one is better than another in some cases, but not sure why.


  1. 为什么MySQL在加入操作时比MongoDB快?

  1. Why is MySQL faster than MongoDB at join operations?

MongoDB为什么在分布式系统中更好地扩展?

Why does MongoDB scale better in distributed system?

为什么MongoDB更快,如果我只是选择一堆表,把所有的对象放在一起,AKA大多数人在网络应用程序做什么?

Why is MongoDB faster if I am "just selecting a bunch of tables and putting all the objects together, AKA what most people do in a web app" ?

感谢太多了!

推荐答案

这个问题缺少任何真正的研究,我的意思是你说你读这个问题,但是这个问题有一些真正的问题,其信息来源或...好吧;无论如何:

This question lacks any real research, I mean you say you read that question but either that question has some real problems with the source of its information or...well; anyway:


为什么MySQL在加入操作时比MongoDB快?

Why is MySQL faster than MongoDB at join operations?

因为它没有任何? MongoDB没有服务器端加入。对不起,我把它放在首都,但我说它soooooo经常,我只是觉得把它作为大多数问题的defacto答案。

Because it doesn't have any? MongoDB HAS NO SERVER SIDE JOINS. I am sorry to put that in capitals but I say it soooooo often, I just feel like placing it as the defacto answer for most questions.

你做的任何连接是客户端侧。这意味着它们实际上会比MySQL或其他SQL技术慢。做连接客户端的重要思想是,做服务器端在巨大的分布式环境中变得非常难以扩展,如果不是不可能的话。这就是为什么许多大SQL用户实际上试图防止巨大的连接,并且正在有效地尝试在SQL中做MongoDB的工作。

Any joins you do are client side. This means they will actually be slower than MySQL, or other SQL techs. The important idea behind doing joins client side is that doing them server-side becomes very hard to scale in huge distributed environments, if not impossible. That is why many big SQL users actually attempt to prevent huge joins and are effectively trying to do in SQL what MongoDB does.

这种情况当然取决于场景。

The case for this is scenario dependant of course.


为什么MongoDB在分布式系统中更好?

Why does MongoDB scale better in distributed system?

http:// docs。 mongodb.org/manual/replication/ 在这里非常重要,因此 http:// docs .mongodb.org / manual / core / sharded-clusters / ,我会建议仔细阅读,以及如何扩展到数据分区,什么不是。

http://docs.mongodb.org/manual/replication/ is very important here and so too is http://docs.mongodb.org/manual/core/sharded-clusters/ and I would recommend reading both carefully and how they scale to data partitions and what not.


为什么MongoDB更快,如果我只是选择一堆表,把所有的对象放在一起,AKA大多数人在一个网络应用程序做什么?

Why is MongoDB faster if I am "just selecting a bunch of tables and putting all the objects together, AKA what most people do in a web app" ?

这是你的意思。

因为你是一个新的数据库,所以我个人建议你的问题是一个错误的问题,所以我回答一个错误的答案。

I realise this isn't much of an answer but your question is one of those defacto questions and so I answered with a defacto answer.

你去使用一个...

这篇关于mongoDB vs mySQL - 为什么一些在某些方面比另一个更好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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