News for hackers. Stuff that matters.
Re:Why Quora uses MySQL rather than No-SQL by rbranson on Wednesday June 30, 2010 @01:36AM (#1474002)
better yet, why isn't Quora using PostgreSQL? :)
Re:Why Quora uses MySQL rather than No-SQL by generalk on Wednesday June 30, 2010 @08:14AM (#1474580)
Can't answer for Quora, but I know why I'm not: activation energy. My team and I know MySQL pretty well, and we can stand by our decision to use it. PostgreSQL we can't.

It's not the most sound technical reasoning.

Re:Why Quora uses MySQL rather than No-SQL by mahmud on Wednesday June 30, 2010 @01:26PM (#1475506)
Postgres is easy to convert to from MySQL, if you keep that conversion cheatsheet handy. However, mastery of its performance quirks (all servers have quirks) can take years.

It took me 48 hours to convert to it, 10 months later and I don't feel like I know much about it.

Re:Why Quora uses MySQL rather than No-SQL by c1sc0 on Thursday July 01, 2010 @08:29AM (#1477790)
Isn't running a system for over 10 months without being forced to learn all the innate details a plus? Gives you nice 'look at the uptime of this baby' bragging rights without too much effort ;-)
Re:Why Quora uses MySQL rather than No-SQL by geoffc on Wednesday June 30, 2010 @08:52AM (#1474659)
I finally made the switch from MySQL to Postgres for my current product. The impetuous was licensing as I got burned by MySQL's ambiguous licensing on a prior product. Now that I have gotten over the learning curve I like Postgres about the same as MySQL. Both are good products but you can move Postgres from a Saas to an onsite deployment as needed without any licensing issues.
Re:Why Quora uses MySQL rather than No-SQL by LiveTheDream on Wednesday June 30, 2010 @12:49PM (#1475417)
impetus
Re:Why Quora uses MySQL rather than No-SQL by amock on Wednesday June 30, 2010 @04:17AM (#1474221)
I have this question about a lot of sites. I've heard very few good things about MySQL and lots about PostgreSQL but MySQL seems to be used more and get more press.
Re:Why Quora uses MySQL rather than No-SQL by bad_user on Wednesday June 30, 2010 @07:45AM (#1474521)
It's just inertia ... I am familiar and worked with both ... but I still chose Mysql over Postgres simply because I have more confidence that I can control it.

That's partly because Mysql always was more user friendly, and I also attended one Mysql conference and got to know some people working on Mysql.

That said, overall Postgres is better, with one exception ... Mysql supports multiple storage engines for various needs. In Postgres you don't have that flexibility.

Re:Why Quora uses MySQL rather than No-SQL by vsync on Wednesday June 30, 2010 @09:13AM (#1474700)
> That's partly because Mysql always was more user friendly

Examples? I started with Postgres and ignored MySQL from day one because of MySQL's deficiencies, and have had 0 problems learning what I needed in the years I've used it. Not to mention I can read a general SQL reference, or the standard, and the information actually applies. Unlike MySQL (quotation marks anyone?).

> That said, overall Postgres is better, with one exception ... Mysql supports multiple storage engines for various needs. In Postgres you don't have that flexibility.

"various needs": what, for those times when you don't care whether your data gets silently corrupted?

Re:Why Quora uses MySQL rather than No-SQL by bad_user on Wednesday June 30, 2010 @04:22PM (#1476074)
> "various needs": what, for those times when you don't care whether your data gets silently corrupted?

I never had data-corruption in Mysql. Of course, I'm always working with InnoDB, maybe MyIsam is weaker

And if Mysql would have been such a weak RDBMS, maybe it wouldn't have been used by companies like Google or Amazon (especially Amazon RDS, which are already configured Mysql instances offered to clients in Amazon's cloud).

> "various needs": what, for those times when you don't care whether your data gets silently corrupted?

Ebay is using the memory tables engine in Mysql instead of Memcached. According to their benchmarks, the Mysql client is more stable, and the combination is more scalable.

There's also a whole ecosystem of third party storage engines. Like when Adobe developed an in-house distributed storage ... they also had an (internal project) storage engine for Mysql that interacted with it.

Also, the soon to be replacement for InnoDB is Falcon ... http://forge.mysql.com/wiki/Falcon (optimized for multiple cores).

Or RethinkDB (YC startup) ... a storage engine optimized for solid-state drives ... http://rethinkdb.com/

And I don't really care about what others think ... Mysql served me well.

Re:Why Quora uses MySQL rather than No-SQL by ericd on Wednesday June 30, 2010 @11:01AM (#1475016)
There are a decent number of things for which I don't care if the data gets corrupted a bit over the long run. Performance is a much bigger consideration.
Re:Why Quora uses MySQL rather than No-SQL by rbranson on Wednesday June 30, 2010 @12:17PM (#1475316)
PostgreSQL has better performance on real-world, high-concurrency loads over multiple cores. MyISAM is slow on tables with lots of writers (table level locking). InnoDB is better, but PostgreSQL is even better. Supposedly MySQL 5.4 is going to fix this. Move into big queries with lots of joins, subqueries, using multiple indexes, and PostgreSQL starts to shine even more.

You can even turn on async commit (since 8.3), which sends a commit acknowledgement message back to the client before the transaction is fully committed, allowing sync clients to move forward. While this does allow a very small window of time where, if the power was pulled on a machine, you'd lose just that bit of data for the tenth of a second it wasn't written to disk. All the other data is safe though, unlike MyISAM's default fsync=off, which gives it all of it's "performance." PostgreSQL also has async network I/O support baked into the libpq driver, which, if the client is written properly, makes this unnecessary. Note that async commit can be set per-connection and toggled on and off.

Virtually all of the 7.x releases were focused on durability, and 8.x releases were focused on performance, culminating with 9.0, due out soon, which will bring the much-needed readable slaves. This is the final feature that will tip the scalability gap in PostgreSQL's favor.

There are is a situation where MySQL shines: read-only MyISAM tables with simple queries where joins are not used. Virtually all of the write concurrency and data integrity features as well as PostgreSQL's performance using multiple indexes and joins become unimportant at this point. MyISAM also supports compressed read-only tables, which are great for this situation. I'd have to ask myself why I wasn't using a simpler NoSQL solution at this point though.

Re:Why Quora uses MySQL rather than No-SQL by ericd on Wednesday June 30, 2010 @12:41PM (#1475386)
Yeah, MySQL could definitely be improved upon. The table-level write locking is a pain. I was just saying that 100% consistency/data integrity isn't really a major concern for a lot of applications.

I've thought about switching to Postgres, but it doesn't currently appear to be worth the pain in my case.

Re:Why Quora uses MySQL rather than No-SQL by bad_user on Wednesday June 30, 2010 @01:29PM (#1475514)
Locking in Innodb is row-level.
Re:Why Quora uses MySQL rather than No-SQL by ericd on Wednesday June 30, 2010 @08:32PM (#1476657)
Yeah, I know, our conversation about read performance at the cost of data integrity being OK was about MyISAM (which doesn't have great concurrent write performance due to the table-level locking).
Re:Why Quora uses MySQL rather than No-SQL by Shorel on Wednesday June 30, 2010 @11:59AM (#1475257)
Marketing driven data. It starts already corrupted.
Re:Why Quora uses MySQL rather than No-SQL by jonhohle on Wednesday June 30, 2010 @09:43AM (#1474761)
For any data you want to reliably read back, MySQL really has one (standard) engine†. Nearly every MyISAM DB I've used in a high traffic environment has eventually corrupted. Your choice is really either InnoDB or ‘repair table’.

† NDB may be a perfectly reliable option, I have not used it.