TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Can PostgreSQL pickup where MySQL left off?

40 点作者 ruffdev超过 13 年前

7 条评论

pilif超过 13 年前
When I started with PHP3 development in 1998, PostgreSQL was still called Postgres95 and it had some severe limitations which were directly adverse to the features needed for web development:<p>1) performance was very slow<p>2) There was an effective row size limit of 8K over the whole row which worked against people who wrote forum software (big posts) or were (ugh) storing binaries in the database.<p>3) Even today, PostgreSQL requires a bit more maintenance and configuration until it works right, whereas MySQL ran out of the box. Back then, VACUUM wasn't at all optional and still required an exclusive lock over the tables it was working on.<p>4) There was a misconception that each Postgres user needed to be a Unix system user (this might or might not be true. Probably isn't, but I and others were certainly thinking that), so it was working against the usual cheap virtual hosting.<p>5) The MySQL extension for PHP was much more advanced than the postgres one, leading to people preferring MySQL which in the end lead to the virtual hosts only installing MySQL at which point Postgres' fate was sealed.<p>6) MySQL was coined as a spiritual successor to mSQL (just look at the names), which was very popular at the time as it was the first SQL-database for "normal people". You either did flat-files or mSQL.<p>7) MySQL had Windows support from the beginning. Postgres95 was still using cygwin (if you could get it to work). Back then, many people were using Windows as their development environment and being able to run the whole stack on your development machine does have some advantages.<p>By now, aside of the maintenance thing, Postgres has lost all these drawbacks, but now it's too late as people are using what they know is working for them, so they are just going with MySQL (or SQLite if they need more simplicity, which is interesting in itself as MySQL for <i>ages</i> provided an embedded linkable and serverless variant which also never took on).
评论 #2937001 未加载
评论 #2937030 未加载
Zak超过 13 年前
I wonder why MySQL became super-popular and Postgres didn't. I remember reading for years about how Postgres had a bunch of stuff (e.g. transactions) that MySQL didn't (until recently) and that anybody who knew anything about databases would choose Postgres, yet people still chose MySQL.<p>What did MySQL have during the last decade that made it better for certain applications than Postgres?
评论 #2936372 未加载
评论 #2936616 未加载
评论 #2936386 未加载
评论 #2936721 未加载
评论 #2936849 未加载
评论 #2936454 未加载
评论 #2937085 未加载
评论 #2936381 未加载
评论 #2936807 未加载
评论 #2936646 未加载
评论 #2936539 未加载
mkup超过 13 年前
Well, PostgreSQL is licensed under BSD, which makes closed-source, commercial forks possible. That's why it is attractive for large businesses, like Apple.<p>GPL-licensed MySQL serves the opposite purpose: it is impossible to fork it into commercial DB product, grow it as times goes by, and threaten Oracle. It is nearly impossible to create commercial product for this market, because there's a free product there: MySQL. MySQL is like a ditch around the Oracle stronghold, a ditch to keep competitors far away. GPL is a perfect tool for such tricks.<p>In contrast to GPL which suppresses commercial developments in it's market segment, BSD encourages them.<p>For the same reason, Apple slowly gets rid of GCC in favour of clang. It is perfectly OK from legal point of view to include BSD-licensed compiler into commercial closed-source IDE, unlike GPL-licensed compiler.
评论 #2936786 未加载
jacques_chester超过 13 年前
IMO the short answer is: no.<p>Most opensource software that uses MySQL is riddled with MySQLisms.
评论 #2936328 未加载
gierach超过 13 年前
In my mind, replication has historically been a pretty big deciding factor in favor of MySQL. PostgreSQL didn't support it natively until version 9.0 (which still isn't part of most Linux distro repositories). You'd have to install Slony or something similar. MySQL made master/slave or master/master replication simple to configure and a breeze to maintain.
ruffdev超过 13 年前
thanks for all these points. I am doing a presentation tomorrow on the same and all these points will help!
pablospr超过 13 年前
When you’re choosing a database, you’re making a long-term decision, because changing your mind later is difficult and expensive. You want to get it right the first time<p>Here's a comparison in a tabluar format <a href="http://database-management-systems.findthebest.com/compare/16-30-43/H2-vs-MySQL-vs-PostgreSQL" rel="nofollow">http://database-management-systems.findthebest.com/compare/1...</a>
评论 #2936746 未加载