Hacker Newsnew | comments | show | ask | jobs | submit login

I'll add my 2 cents :-)

A lot of it has to do with historical reasons which have reinforced themselves over time.

Here are some of the early differences:

* MySQL had an ungly way to allow users to only see their tables. While it wasn't great it was better than PostgreSQL which didn't really have a way to hide other databases.

* MySQL could create and destroy connections quickly. PostgreSQL made more robust connections but they took longer to setup.

* MySQL ran simple queryies much quicker under a light load.

* PostgreSQL database maintence tasks often required the database to be offline.

While these differences didn't make a big difference in a business environment PostgreSQL would have been a better option because:

* Use connections pools and not care about the connection setup time.

* Have a high load and care more about how the database ran under load.

* Have a trusted users and not care that they could see other databases.

* Have maintence periods.

That being said in the business world users used MS SQL or Oracle. Where MySQL took off was shared hosting which:

* Had light usage.

* Limited resources which meant that they often banned connection pooling.

* Had multiple untrusted users.

* Can handle a slowdown but not downtime.

In this situation MySQL was the better option.

This then caused a network effect where most software was written for MySQL so more companies offered it (remember at this time lots of companies only offer static hosting). Since most companies offered it more people wrote software that supported it.

Programs that support PostgreSQL often support MS SQL, MySQL and a number of databases BUT there are a number programs that only support MySQL. This means that if you want to run a number of programs it is easier to run MySQL rather than PostgreSQL since you'll have to run it anyway.

So while PostgreSQL has largely fixed the problems they had on shared hosting MySQL still has the market share.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: