7 ms·
Will anyone please explain the tactical reasons why PostgreSQL won? It's pretty obvious it has. I've basically ignored the database wars for a few years, so i
by sillysaurus2 13y ago
Will anyone please explain the tactical reasons why PostgreSQL won? It's pretty obvious it has. I've basically ignored the database wars for a few years, so it's kind of interesting to see that everyone's using PostgreSQL now.
- kvinnako 13y agoOne of many reasons is MySql being bought by Oracle and name change/lost of community backing etc...along with some missing advanced technical features....
- craigkerstiens 13y agoI've written a couple of blog posts about what makes Postgres a great database, many of these reasons are why its now preferred by so many devs - http://www.craigkerstiens.com/2012/04/30/why-postgres/ http://www.craigkerstiens.com/2012/04/30/why-postgres/
- avenger123 13y agoI wouldn't say PostgresSQL has won. MySQL is still very relevant. I would say that if you are just starting out and you already know MySQL and you are proving out your MVP, MySQL is still relevant. Once you have a stable product and you need a better database, PostgresSQL is a good move up.
- jon-wood 13y agoGiven the number of companies who'll provide you with a fully managed Postgres installation there's no reason not start out on it for the MVP - as a user its no harder than MySQL. Even as a sysadmin its not significantly harder, just different to work with to MySQL.
- asdasf 13y agoI wish I lived in your world. Where I am, 90%+ of web developers believe there are two options for making web sites: "LAMP" and .net/sql server. I am constantly dealing with web developers who genuinely don't even know postgresql exists.
- jes5199 13y agoSome engineers I worked with went and interviewed people at various San Francisco startups about their experiences with their databases. The MySQL startups tended to say "We love MySQL. We've gotten in the habit of taking an hour or two of downtime in the middle of the night every week to run all of our schema migrations, and we've had to build our process around that, but one we had it in place, everything's been fine." The PostgreSQL startups said "We love PostgreSQL. We run schema migrations in real-time during the middle of our workday, and we don't have any problems."
- smileysteve 13y agoVery important to note that MySQL 5.6 has ONLINE ALTER.
- maaku 13y agoIs it transactional?
- dangrossman 13y agohttps://blogs.oracle.com/mysqlinnodb/entry/online_alter_table_in_mysql https://blogs.oracle.com/mysqlinnodb/entry/online_alter_tabl...
- Sanddancer 13y agoLooking through the documentation, though, it's even worse than just saying every alter is an offline alter. There are a few, but significant, schema changes that one could want to make -- like when dealing with a table that has full text search -- that need to be done offline; you have to tread real real lightly in dealing with online alters. I'd personally argue that online alter is not ready for prime time with 5.6; there are too many other things they need to do with the database engines to make it really useful.
- ceejayoz 13y agopt-online-schema-change from Percona addresses this particular point with MySQL nicely for us, incidentally. We use their Percona XtraDB Cluster fork and are quite happy.
- AaronBBrown 13y agoWhat has it won?
- ExpiredLink 13y agomindshare
- pbreit 13y agoHmmm...I was wondering why MySQL is still much more widely used.
- vec 13y agoInertia, largely. Postgres is more scalable and has quite a few nonstandard additions that are insanely useful from time to time, but it's not always a drop-in MySQL replacement. If you're just writing something simple like a blog or CMS then you don't need the extra functionality. Plus Wordpress has a hard requirement for MySQL, and like it or not a huge number of projects still use it as a framework.
- justincormack 13y agobut if its just a blog use mongo not mysql. non relational is a benefit and you have backups... postgres for real stuff.
- eonil 13y agoIt was used, so still just there. But not anymore if they finally learned why safety in design philosophy is important by paying data corruption or service break. (anyway some people never learn…) Safety is annoying. Safer system usually generate more errors to prevent accidental mistakes. Extremely safe system prohibits even booting up the product if it's not been properly configured. It simply has much more annoying safety net. If you care the safety, this kind of annoying errors are good sign to you. But if you're newbie, this is just a big obstacle, which makes stiff learning cube. Really. We still see many people who hate to use safety belt. Because it's annoying. And everybody did before benefits of safety belt were widely known and accepted. Also, number of users says nothing about how well the product works. Usually, cheapest product takes biggest user-base. MySQL is cheapest to start due to lack of safety. Search this thread for the name "natural219". And see why he chose MySQL over PostgreSQL. I believe that's why most people started MySQL at first. And surprisingly, there're so many people really don't care data safety. (maybe not that much surprise. we always see those people in TV…)
- 13y ago
- chc 13y agoI don't know if I would really say Postgres won. Among people who care about databases, Postgres has always been the more popular of the big two free databases. Postgres was actually dedicated to being a good relational database, whereas MySQL in its earlier days was willing to cut corners to the point where it wasn't even ACID in most common configurations. But MySQL was faster (because, again, cutting corners) and its tooling was a little more friendly (especially for the PHP crowd). Over the years, Postgres has made up those shortcomings, so it retains its respect among database wonks and now other people can easily use it too, so you see a lot of people adopting it over the past few years. But in overall usage numbers, I would be surprised if it were anywhere near MySQL. It takes a long time to overcome that kind of inertia.
- nerfhammer 13y agodon't forget postgres didn't officially support replication until late 2010, which was a total non-starter for many/most production uses
- chc 13y agoYeah, I think that was the big hurdle that finally made Postgres acceptable to people and started the wave of switchers.
- gtaylor 13y agoIt is a bit surprising how long it took for that to land. On the plus side, replication is very easy and low latency with 9.3. There's still a bit to do on the auto-failover front, but that may end up being more of a third party undertaking. Postgres has failover facilities included, they just have to be driven by something external right now.
- Sssnake 13y agoThat is absolutely ridiculous. Less than 1% of 1% of mysql users are using replication. Suggesting it is a "total non-starter" for most production uses is crazy.
- 13y ago
- ancarda 13y agoI still use MySQL because trying out PostgreSQL recently scared me away. Maybe I was trying the wrong thing but I couldn't get pgAdmin to display my tables. I think I sank most of my afternoon trying unsuccessfully to do something MySQL can do in 5 minutes. I recognize I'm used to MySQL but I was under the impression that because PostgreSQL has a similar syntax (SQL) it wouldn't take too long to pickup.
- jherdman 13y agoCan you elaborate further?
- ancarda 13y agoComing from a MySQL background, I sort-of assumed PostgreSQL worked the same way. I remember after setting up the server, pgAdmin was very difficult to navigate. I managed to get a database and table made and got some data in (using SQL) but I couldn't view any of the data. Compared to MySQL + Sequel Pro it was very difficult to use for a beginner. Postgres is very powerful and can do a lot. I think I just need a good tutorial and some time to get used to it.
- Sssnake 13y agoNone of that has anything to do with postgresql. Pgadmin is crappy, don't use it. Use one of the dozens of database independent admin tools, or just stick with the best tool: psql.
- mixmastamyk 13y agoUnfortunately things that take 5 minutes in a complex application typically required an order of magnitude larger investment up front in manual reading and experience.
- gtaylor 13y agoI deal with Postgres a good bit, but will be the first to tell you that pgAdmin has got some issues. It's a very clunky, buggy, moody piece of software. I've had better luck learning how to use the psql command/shell than mess with pgAdmin, at least in certain cases. To take your example of displaying tables, psql in and type: \dt The rest is just a search away.
- r888888888 13y agoIMO it was when Oracle bought MySQL and effectively killed development. MySQL still lives on with MariaDB I suppose, but in the years since Postgres has leapfrogged it in terms of functionality.
- jacques_chester 13y agoI'm a PostgreSQL fan, but Oracle are investing in MySQL development, but their flavour of open source compliance is tarballing. 5.6 had some pretty critical improvements, especially to the query planner.
- jeffdavis 13y agoTactically, because PostgreSQL predictably releases robust software every year with major improvements and innovations. Strategically, because PostgreSQL is not just trying to be a free database checking off features. It's trying to be something better -- lots of innovation that is having a bigger impact on what developers and DBAs can do.
- reinhardt 13y agoYou must be joking right? Either that or spending too much time on HN. PostgreSQL has won in the same sense that Golang or Clojure have won: in frequency of frontpage HN articles.
- zeroDivisible 13y agoI think it all depends how you define winning here. Based on popularity alone - yeah, MySQL is still the king. Based on capabilities - I think it's fair to say that pgSQL is more capable and it's just that not everybody needs that one. And even though I love PostgreSQL (and was working with all major databases), I still think that the real winner is sqlite :)
- eonil 13y agoI would like to say it is because MySQl has been sold to a company with no reason to keep it well. That's the one of biggest reason to make existing MySQL users to move on.
- e12e 13y agoI'd venture a guess, and say that Postgresql didn't win, sqlite and mongodb won. I think a lot of the reason behind MySQLs initial success was blogs and various php-apps that weren't architected properly (from a db perspective). Some of these didn't need a ("proper") db, and most of them probably did, but "worked well enough" without one. I never really understood why you'd want to use a separate dbms if it couldn't do proper constraints, triggers, transactions and materialized views for you -- then it starts to feel like a lot of wasted effort. So for many of the use-cases where MySQL might have been appropriate, we now have sqlite, mongodb, memcache/redis and a few others. Personally I don't really see any reasonable use-cases for mongodb, just as I didn't see many reasonable use-cases for mysql -- not that you couldn't build stuff on top of it, just that it wasn't a very good idea.