作者:桃园犬吠_207 | 来源:互联网 | 2023-09-25 15:24
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 个解决方案
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。但我怀疑你需要走到这么极端。只需购买更多内存。