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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Mysql vs PostgreSQL?

8 点作者 rsa大约 12 年前
which one do you prefer ? What are your experiences working with these databases in a web application ?

4 条评论

athiercelin大约 12 年前
Postgresql.<p>I have been working with postgresql for more than 8 years now. I created FPPostgreSQL a cocoa framework for Postgresql (the only one?). (developer.flyingpigcorp.com)<p>What makes postgresql better? - Better SQL features - PL/SQL - Stored procedures - Performances - Configurations options.<p>As for web apps, mysql has "better" integration with many scripting languages, but when it is time to select a DB you'll get pass the few integrations issues you might have and focus on perf and features. Since acquisition by Oracle, MySQL is getting better and better, but still my heart is with PG. PG will deliver the performances you need.<p>Note: I just came back from while42 event in SF @ socialcam, and they use mostly postgresql for the db work.
ksherlock大约 12 年前
I started with MySQL and switched to Postgres. pl/sql, triggers, stored procedures, etc were the main thing at the time (this was before MySQL 5).<p>It seems like Postgres gives you more power and flexibility at the expense of slightly more work. Consider an auto-incrementing column. in MySQL, you just create it as AUTO_INCREMENT. In postgres, you need to create a sequence generator table (which is actually no extra work if you create the column with a type of serial). But with postgres, you can have multiple auto incrementing columns in a table. MySQL is limited to 1 AUTO_INCREMENT per table.
rc4algorithm大约 12 年前
Check out MariaDB for an open source fork of MySQL. Oracle has handled MySQL extremely poorly since they acquired it from Sun.
bmelton大约 12 年前
I work primarily in Django, so I luckily don't have to care very much about which one I'm using. That said, I usually prototype / develop against MySQL, just because it is what I'm most familiar with, and deploy against PostgreSQL, because I believe it to be more stable (when unattended).<p>Actually, if I'm being completely honest, MOST of what I deploy to is a mix of Postgres and Oracle, but that wasn't asked, and I don't recommend Oracle to anybody that isn't specifically selling on-prem solutions for Enterprise or government customers.