6 ms·
PostgreSQL appears more popular on HN because MySQL isn't as sexy, feature laden, and a lot of Rails developers jumped away from MySQL due to some of its flaws.
by programminggeek 13y ago
PostgreSQL appears more popular on HN because MySQL isn't as sexy, feature laden, and a lot of Rails developers jumped away from MySQL due to some of its flaws. For all non HN users, MySQL is hugely popular, as is PHP. Both are cheap, widely available, and easy to setup on both Windows and Mac.
MySQL is fantastic for probably 90% of what you'd ever think to use it for. MySQL is also a lot easier to find cheap hosting for and has tons of documentation spread throughout the internet. It's worked well for plenty of websites at ridiculously massive scale for a long time and by the time you ever get "to scale", your problems will almost always be with your code, structure, a poorly designed query, or a severe lack of caching long before you run into problems with MySQL.
PHP and MySQL aren't the sexy HN choice, and there are problems with both, but both will get you a very long ways before they are ever your main problem as a startup.
- teacup50 13y ago> PHP and MySQL aren't the sexy HN choice, and there are problems with both, but both will get you a very long ways before they are ever your main problem as a startup. This is only true if you don't have your technological sights set particularly high. We could not implement some of the things we do, reliably, with PHP and MySQL. We'd spend more time battling the tools than we would working on our actual product.
- talideon 13y agoPostgreSQL is one of the last things I'd describe as sexy in any way, shape, or form. It's utterly, uncompromisingly utilitarian.
- srd 13y agoWhich does make it sexy for those of us who prefer quality to glossy hype.
- twic 13y agoIt's Colin Firth rather than Hugh Grant.
- tel 13y agoI dunno about you, but that's exactly what gets me excited in a database product.
- KingMob 13y agoSeriously. Databases should be as reliable as a rock. At my first startup, I quickly ran afoul of MySQL's silent string truncation behavior as well as its silent invalid dates = 0 error. Wait, my database is tossing out my data? If my head could have spun around, it would. In no universe should silent truncation ever have been a default behavior. I've avoided MySQL ever since.
- jbeja 13y agoI think that most rails devs don't use mysql, not because due it flaws, but fron the beginning heroku only supported postgres.
- deleted 13y ago[deleted]
- swasheck 13y ago> because MySQL isn't as sexy, feature laden you misspelled "responsible with data, standards-compliant, concerned with doing things the correct way."
- imakesnowflakes 13y ago> but both will get you a very long ways.. MySQL (and MariaDB) wont let you refer to temporary tables more than once in the same query. http://dev.mysql.com/doc/refman/5.0/en/temporary-table-problems.html http://dev.mysql.com/doc/refman/5.0/en/temporary-table-probl... I am not sure that was a very long way when I needed this for an app I was working on.
- copergi 13y ago>MySQL is fantastic for probably 90% of what you'd ever think to use it for No, it is tolerable if you don't know any better. That's like saying a gremlin is fantastic for 90% of what you'd ever think to use it for. If you have a choice, and know other cars exist, then you wouldn't think to use it for anything. If you don't know other cars exist, then you can hardly be believed for claiming it is "fantastic". Mysql is a nightmare. It is incredibly crippled, full of limitations that force you to add complexity to your code to work around them, and offers nothing positive to make up for these downsides. >but both will get you a very long ways before they are ever your main problem as a startup. Haha, tell that to our SQL server guy who got stuck doing a PHP/mysql project. He didn't get through the first day without coming to me asking "how do you linux people function when your database can't do anything?". He ran into three separate mysql limitations in the first day he was using it.
- stormbrew 13y agoYou should have asked him about the fun contortions sql server people have to go through to do offset/limit (though apparently this has been improved recently): http://stackoverflow.com/questions/2135418/equivalent-of-limit-and-offset-for-sql-server http://stackoverflow.com/questions/2135418/equivalent-of-lim...
- copergi 13y agoNah, I took it as an opportunity to educate him. He learned that I am not a linux guy, and that there's actually lots of unix operating systems. And then he learned that mysql isn't the linux database, it is just a database and that he should use postgresql instead.
- Amezarak 13y agoAlthough most of my experience is with MySQL, and to a lesser extent Postgres, I spend two years supporting enterprise applications that had either an Oracle or a SQL Server (either 2008R2 or 2012) backend. I can confirm that in comparison, SQL Server is a developer's dream. My understanding is that the earlier versions of SQL Server kind of sucked, but the new ones are fantastic. The sibling post's point is valid for 2008R2 and earlier - you had to use a ROW_NUMBER() subquery - but that was one of the very few niggles. I wasn't a fan of Oracle in general - it's comparatively a nightmare to setup and maintain, and in my opinion the SQL syntax is uglier. But from a dev/support standpoint, Oracle's flashback queries is what impressed me - in Oracle you can write something like SELECT * FROM table AS OF TIMESTAMP. So, say, if you accidentally deleted a couple rows and committed the transaction, you could restore them using a flashback query. My impression was that Oracle was more scalable and supported more enterprisey features, but that's not really my area of expertise. Honestly, if SQL Server wasn't wildly expensive for any real work, it would be my number one choice and my number one recommendation. Guess you can't have everything. And Oracle, of course, is even more expensive. So Postgres it is! ...well, except on my Dreamhost sites, because MySQL is what they have.
- AlisdairO 13y agoFor me it's not about sexiness - there's just no compelling reason to use MySQL over Postgres if I have the choice, apart from ease of availability on cheap hosting platforms. In terms of actual functionality, MySQL is worse in almost every respect. It's not the den of horror that some will make it out to be, but it's just not as good.
- tel 13y agoMySQL is okay so long as "database" means "set of Excel sheets on a server". Honestly, that's what most web developers are comfortable with, what most ORMs target, and, thusly, what many, many "databases" are at the end of the day. But it's worth noting that relational databases were designed with an entirely other use case in mind, one where the database provides far more functionality than "collection of Excel sheets". For these uses MySQL is a shitshow barely worth considering.