News for hackers. Stuff that matters.
Re:SQLite vs MySQL vs PostgreSQL by nathell on Wednesday March 19, 2014 @09:50PM (#7433288)
Can the authors somehow back the statement of MySQL's popularity vs. PostgreSQL? If anything, the latter seems more popular, judging from the frequency of its appearances on HN.
Re:SQLite vs MySQL vs PostgreSQL by programminggeek on Wednesday March 19, 2014 @10:15PM (#7433410)
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.

Re:SQLite vs MySQL vs PostgreSQL by swasheck on Wednesday March 19, 2014 @11:40PM (#7433695)
> because MySQL isn't as sexy, feature laden

you misspelled "responsible with data, standards-compliant, concerned with doing things the correct way."

Re:SQLite vs MySQL vs PostgreSQL by talideon on Wednesday March 19, 2014 @11:11PM (#7433569)
PostgreSQL is one of the last things I'd describe as sexy in any way, shape, or form. It's utterly, uncompromisingly utilitarian.
Re:SQLite vs MySQL vs PostgreSQL by srd on Thursday March 20, 2014 @02:15AM (#7434162)
Which does make it sexy for those of us who prefer quality to glossy hype.
Re:SQLite vs MySQL vs PostgreSQL by twic on Thursday March 20, 2014 @08:39AM (#7435127)
It's Colin Firth rather than Hugh Grant.
Re:SQLite vs MySQL vs PostgreSQL by tel on Thursday March 20, 2014 @08:35AM (#7435102)
I dunno about you, but that's exactly what gets me excited in a database product.
Re:SQLite vs MySQL vs PostgreSQL by KingMob on Thursday March 20, 2014 @02:47PM (#7437712)
Seriously. 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.

Re:SQLite vs MySQL vs PostgreSQL by teacup50 on Wednesday March 19, 2014 @11:06PM (#7433551)
> 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.

Re:SQLite vs MySQL vs PostgreSQL by imakesnowflakes on Thursday March 20, 2014 @12:46AM (#7433947)
> 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-probl...

I am not sure that was a very long way when I needed this for an app I was working on.

Re:SQLite vs MySQL vs PostgreSQL by AlisdairO on Thursday March 20, 2014 @05:41AM (#7434578)
For 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.

Re:SQLite vs MySQL vs PostgreSQL by tel on Thursday March 20, 2014 @08:34AM (#7435097)
MySQL 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.

Re:SQLite vs MySQL vs PostgreSQL by jbeja on Wednesday March 19, 2014 @11:39PM (#7433684)
I think that most rails devs don't use mysql, not because due it flaws, but fron the beginning heroku only supported postgres.
Re:SQLite vs MySQL vs PostgreSQL by copergi on Thursday March 20, 2014 @01:01AM (#7433986)
>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.

Re:SQLite vs MySQL vs PostgreSQL by Amezarak on Thursday March 20, 2014 @07:45AM (#7434930)
Although 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.

Re:SQLite vs MySQL vs PostgreSQL by stormbrew on Thursday March 20, 2014 @01:22AM (#7434043)
You 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-lim...
Re:SQLite vs MySQL vs PostgreSQL by copergi on Thursday March 20, 2014 @10:32AM (#7435722)
Nah, 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.
Re:SQLite vs MySQL vs PostgreSQL by mgkimsal on Wednesday March 19, 2014 @09:59PM (#7433338)
HN is a very loud bunch on some topics, but it's still a tiny number of people. Every wordpress instance out there is running on MySQL. Wordpress runs > 18% of public websites.

http://thenextweb.com/insider/2013/07/27/wordpress-now-power... and http://w3techs.com/technologies/details/cm-wordpress/all/all

Let's say their numbers are off by 2 - "only" 9% of public websites on wordpress. That's still a staggering number, and they're all running MySQL.

Re:SQLite vs MySQL vs PostgreSQL by JoshGlazebrook on Wednesday March 19, 2014 @10:00PM (#7433346)
On HN? Yes. Globally? No.

Think about the tens of thousands of cheap, shared web hosting services that provide the same Apache+PHP+MySQL setup. Not many of them are providing Postgres as an option.

Re:SQLite vs MySQL vs PostgreSQL by dvhh on Wednesday March 19, 2014 @09:57PM (#7433325)
The popularity of something on HN vs popularity in general is not comparable, HN is only a small subset of the general developer population.
Re:SQLite vs MySQL vs PostgreSQL by nerfhammer on Wednesday March 19, 2014 @10:23PM (#7433433)
I bet most people on HN still use MySQL, they just don't talk about it as much
Re:SQLite vs MySQL vs PostgreSQL by wvenable on Thursday March 20, 2014 @01:35AM (#7434072)
I still use MySQL but that's because when I started my last big project, Postgres was still iffy in places (replication, etc) and no where near as popular.

I might still use MySQL for future projects because I still have to know it and I already have it in use.

But if I instantly had no legacy to support and starting a new project, I wouldn't hesitate to use Postgres.

Re:SQLite vs MySQL vs PostgreSQL by alien3d on Thursday March 20, 2014 @01:52AM (#7434105)
i still use mysql.Maybe futured will db2c.
Re:SQLite vs MySQL vs PostgreSQL by jbeja on Wednesday March 19, 2014 @11:41PM (#7433703)
I bet that most people that say they don't use MySQL, still use it.
Re:SQLite vs MySQL vs PostgreSQL by damon_c on Thursday March 20, 2014 @01:20AM (#7434038)
Wordpress doesn't work with Postgres out of the box, so that's a big chunk of the internet right there that is using MySQL.
Re:SQLite vs MySQL vs PostgreSQL by copergi on Thursday March 20, 2014 @12:13AM (#7433844)
Postgresql seems more popular from reading blogs, news sites, etc because it is moving up in popularity while mysql is moving down. So there is more talk about it, even though there is still less usage. All the people switching to postgresql from mysql and talking about how much better it is, all the people hearing that and asking about it, etc. Mysql is still more popular, notice how lots of the typical PHP turdware doesn't even support postgresql for example.