(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=38695750
根据讨论材料中提供的信息,关于 MySQL 与 PostgreSQL 的相对优点,需要考虑的一些要点是:
1. MySQL 默认允许隔离级别一致性,为技术含量较低的团队成员或环境提供简单的设置,无需额外配置。
2. MySQL 的宽松索引扫描和索引跳跃扫描在处理连接聚合操作方面比 PostgreSQL 中的同等方法提供更好的性能。
3. 虽然由于每连接一个进程的设计限制,MySQL 在某些方面可能会存在不足,例如更新密集型场景中的死锁,但传统上它在读取密集型应用程序的读取性能和可扩展性方面表现得非常好。
4. 与 PostgreSQL 不同,MySQL 提供内置的本机复制机制作为标准产品。
然而,应该注意的是,个人喜好和意见在选择特定数据库系统时发挥着作用。 最终,MySQL 和 PostgreSQL 之间的决定通常归结为项目要求、团队内的技能以及管理各自系统的个人专业知识水平等因素。 尽管如此,仍然有必要彻底评估与每个平台相关的技术细微差别和限制,并根据通过实际观察和实验获得的见解做出明智的决策。
I think two isolation levels that make sense are either:
* read committed
* serializable
You either go all the way to have a serializable setup, where there are no surprises. OR, you go in read committed direction where it is obvious that if you want have a consistent view of the data within a transaction, you have to lock the rows before you start reading them.
Read committed is very similar to just regular multi-threaded code and its memory management, so most engineers can get a decent intuitive sense for it.
Serializable is so strict that it is pretty hard to make very unexpected mistakes.
Anything in-between is a no man's land. And anything less consistent than Read Committed is no longer really a database.
reply