热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

哪个是大型数据库的更好平台-Whichisbetterplatformforlargescaledatabase

BetweenMysqlandPostgreSQL,whichissuiteforverylargescaleofdata..forexample,millionsofr

Between Mysql and PostgreSQL,which is suite for very large scale of data..for example, millions of record...i think,i should use PostgreSQL...any suggestion guys?

在Mysql和PostgreSQL之间,这是一个非常大规模的数据套件...例如,数百万的记录...我想,我应该使用PostgreSQL ...任何建议的家伙?

4 个解决方案

#1


4  

I think it depends a lot on what you mean by "better". You should probably identify your needs before choosing one or the other.

我认为这取决于你对“更好”的意思。在选择其中一个之前,您应该确定自己的需求。

Faster? More reliable? Allows replication? Can do more complex queries? Is your application amenable to "sharding" in which case you probably want a database which can cluster and be administered more easily, or do you need everything in one massive set of linked tables, in which case you probably want good support for many cores and large memory. Do you have a complex authentication set up or is it a simple "one user" web application? Is the bulk of the data in binary objects, or is it simple numbers and strings? How will you do your backups?

更快?更可靠?允许复制?可以做更复杂的查询吗?您的应用程序是否适合“分片”,在这种情况下,您可能需要一个可以更容易地进行集群和管理的数据库,或者您是否需要一组大量链接表中的所有内容,在这种情况下,您可能需要对许多内核和大记忆。您是否拥有复杂的身份验证设置,或者它是一个简单的“单用户”Web应用程序?二进制对象中的大部分数据,还是简单的数字和字符串?你将如何备份?

MySQL and PostgreSQL both seem to be very capable databases, and both have been used successfully at large scale, so I'd suggest you need to identify the specific needs of your application first.

MySQL和PostgreSQL似乎都是非常强大的数据库,并且已经大规模成功使用,因此我建议您首先需要确定应用程序的特定需求。

My inclination would be towards PostgreSQL, but that's mainly because I had a few disasters with MySQL losing data a few years ago and I haven't come to trust it again. PostgreSQL has been very nice in terms of being able to make backups easily.

我的倾向是PostgreSQL,但这主要是因为几年前MySQL发生了一些丢失数据的灾难而且我还没有再相信它。 PostgreSQL在能够轻松进行备份方面非常出色。

#2


5  

I've used both in similar situations, and sheer size of the DB doesn't seem to affect their scaling in substantially different ways. PostgreSQL is much more complete and solid, and will much better support complex queries and their optimization, while MySQL may shine in terms of retrieval speed for extremely simple queries; but these aspects are independent of the sheer size issue.

我在类似的情况下都使用了它们,并且数据库的庞大大小似乎并没有以完全不同的方式影响它们的缩放。 PostgreSQL更加完整和可靠,并且可以更好地支持复杂查询及其优化,而MySQL可以在极其简单的查询的检索速度方面发挥作用;但这些方面与庞大的问题无关。

#3


4  

Postgres has a richer set of abilities and a better optimizer; its ability to do hash joins often makes it much faster than MySQL for joins. MySQL is rumored to be faster for simple table scans. The storage engine you use underneath matters a lot, as well.

Postgres拥有更丰富的能力和更好的优化者;它能够进行散列连接通常比连接MySQL的速度快得多。据传,对于简单的表扫描,MySQL更快。您在下面使用的存储引擎也很重要。

At some point, scaling becomes a choice between two options: scale by buying bigger hardware, or scale by introducing new machines (which you can shard the data to, use as slave replicas, or try a master-master setup -- both Posgres and MySQL have solutions of various levels of quality for these sorts of things).

在某些时候,缩放成为两种选择之间的选择:通过购买更大的硬件进行扩展,或通过引入新机器进行扩展(可以将数据分片,用作从属副本,或尝试主 - 主设置 - Posgres和MySQL为这些事物提供了各种质量水平的解决方案。

A few million rows of table data fit in a standard server's memory these days; if that's all you are doing, you don't need to worry about this stuff -- just optimize whatever database you are most comfortable with, to ensure the proper indexes are created, everything is cached (and something like memchached is used where appropriate), and so on.

如今,几百万行表数据适合标准服务器的内存;如果这就是你所做的一切,你不需要担心这些东西 - 只需优化你最熟悉的数据库,以确保创建正确的索引,缓存所有内容(并在适当的地方使用memchached) , 等等。

People mention that Facebook uses MySQL; that's kind of true. Kind of because what they are actually doing is using hundreds (thousands now?) of mysql databases, all of them responsible for their own little cross-section of the data. If you think you can load facebook into a MySQL (or postgres, or oracle) instance... well, they'd probably love to hear from you ;-).

人们提到Facebook使用MySQL;那是真的。有点因为他们实际上在做的是使用数百(现在数千?)的mysql数据库,所有这些都负责他们自己的小数据横截面。如果您认为可以将facebook加载到MySQL(或postgres或oracle)实例中......那么,他们可能很乐意听取您的意见;-)。

Once you get into the terabyte land, things get difficult. There are specialized solutions like Vertica, Greenplum, Aster Data. There are the various "nosql" datastores like Cassandra, Voldemort, and HBase. But I doubt you need to go to such an extreme. Just buy a bit more RAM.

一旦你进入太字节的土地,事情变得困难。有专门的解决方案,如Vertica,Greenplum,Aster Data。有各种“nosql”数据存储区,如Cassandra,Voldemort和HBase。但我怀疑你需要走到这么极端。只需购买更多内存。

#4


2  

Well, it ultimately depends on what you are most comfortable with. According to MySQL, there is no imposed theoretical limit on the size of the database...it depends on the capability of the hardware supporting it. With the number of rows, using InnoDB, the theoretical limit is 256 terabytes. The reason I keep throwing out theoretical is that, there is probably a very small chance that you could possibly index 256 terabytes of data, so that is what they are approximating might be a limit. If you hit that max, you got bigger problems. Current users of MySQL in production, that I can think of, are YouTube and Facebook. Those are probably the two largest...and it appears that they are faring well.

嗯,这最终取决于你最满意的。根据MySQL的说法,对数据库的大小没有强加的理论限制......它取决于支持它的硬件的能力。对于行数,使用InnoDB,理论上的限制是256太字节。我不断抛弃理论的原因是,你可能很有可能索引256TB的数据,因此他们所接近的数据可能是一个限制。如果达到最大值,你会遇到更大的问题。我能想到的当前MySQL生产用户是YouTube和Facebook。这些可能是最大的两个......而且它们似乎表现得很好。

But once again, as I stated above. It is whatever you are most comfortable with.

但是,正如我上面所述,再一次。这是你最舒服的。


推荐阅读
  • 关于我们EMQ是一家全球领先的开源物联网基础设施软件供应商,服务新产业周期的IoT&5G、边缘计算与云计算市场,交付全球领先的开源物联网消息服务器和流处理数据 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • 本文介绍了数据库的存储结构及其重要性,强调了关系数据库范例中将逻辑存储与物理存储分开的必要性。通过逻辑结构和物理结构的分离,可以实现对物理存储的重新组织和数据库的迁移,而应用程序不会察觉到任何更改。文章还展示了Oracle数据库的逻辑结构和物理结构,并介绍了表空间的概念和作用。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 本文介绍了九度OnlineJudge中的1002题目“Grading”的解决方法。该题目要求设计一个公平的评分过程,将每个考题分配给3个独立的专家,如果他们的评分不一致,则需要请一位裁判做出最终决定。文章详细描述了评分规则,并给出了解决该问题的程序。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • r2dbc配置多数据源
    R2dbc配置多数据源问题根据官网配置r2dbc连接mysql多数据源所遇到的问题pom配置可以参考官网,不过我这样配置会报错我并没有这样配置将以下内容添加到pom.xml文件d ... [详细]
  • WhenIusepythontoapplythepymysqlmoduletoaddafieldtoatableinthemysqldatabase,itdo ... [详细]
  • PDO MySQL
    PDOMySQL如果文章有成千上万篇,该怎样保存?数据保存有多种方式,比如单机文件、单机数据库(SQLite)、网络数据库(MySQL、MariaDB)等等。根据项目来选择,做We ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • GreenDAO快速入门
    前言之前在自己做项目的时候,用到了GreenDAO数据库,其实对于数据库辅助工具库从OrmLite,到litePal再到GreenDAO,总是在不停的切换,但是没有真正去了解他们的 ... [详细]
  • Postgresql备份和恢复的方法及命令行操作步骤
    本文介绍了使用Postgresql进行备份和恢复的方法及命令行操作步骤。通过使用pg_dump命令进行备份,pg_restore命令进行恢复,并设置-h localhost选项,可以完成数据的备份和恢复操作。此外,本文还提供了参考链接以获取更多详细信息。 ... [详细]
  • Todayatworksomeonetriedtoconvincemethat:今天在工作中有人试图说服我:{$obj->getTableInfo()}isfine ... [详细]
  • 本文介绍了使用数据库管理员用户执行onstat -l命令来监控GBase8s数据库的物理日志和逻辑日志的使用情况,并强调了对已使用的逻辑日志是否及时备份的重要性。同时提供了监控方法和注意事项。 ... [详细]
  • 本文讨论了使用差分约束系统求解House Man跳跃问题的思路与方法。给定一组不同高度,要求从最低点跳跃到最高点,每次跳跃的距离不超过D,并且不能改变给定的顺序。通过建立差分约束系统,将问题转化为图的建立和查询距离的问题。文章详细介绍了建立约束条件的方法,并使用SPFA算法判环并输出结果。同时还讨论了建边方向和跳跃顺序的关系。 ... [详细]
author-avatar
桃园犬吠_207
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有