Live data from Hacker News

Why doesn't Quora use PostgreSQL

quora.com

61–70 of 78 posts

Re: Why doesn't Quora use PostgreSQL

#61
post #50

Earlier quoted context omitted.

I'm glad I migrated that huge application from MySQL to Postgres back in 2000. I'm glad I did not touch MySQL for serious stuff ever since then. You should refrain from commenting on MySQL then. It's amazing (and sad) how many pro-PG-anti-MySQL folks don't even know basic things about MySQL but feel entitled to rant and call it "toy DB", "not real RDBMS", etc.

note the emphasis on "serious stuff". I did in fact touch MySQL since then in the process of setting up various open source applications that require MySQL. While back then, I needed Postgres for some features MySQL didn't have but otherwise didn't really dislike MySQL, over those 10 years, I really learned to hate MySQL: - try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error me…

So basically you learned to hate MySQL while not doing anything serious with it. Interesting.

  - try (erroneously) adding or inserting latin1-data into a UTF-8
  table. You'd expect an error message, but instead your data gets
  truncated at the first byte with the high bit set. 
False.

  - "alter table sometable add somcolumn integer not null"
  will gladly add the column and place null values in each
  row. Null values that should absolutely not be there. No
  error. No warning.
False.

  Same goes for date columns, but there it's even better as it'll
  set the date to 0000-00-00 which is invalid if you try to add this
  in an insert or update.
That's why I said those who don't know MySQL like to complain — hardly any of doing the rants have heard about sql modes:

  mysql> alter table t1 add column (dob date not null);
  ERROR 1292 (22007): Incorrect date value: '0000-00-00' for
  column 'dob' at row 1

  - I said "corrupt table" earlier. Yeah. That happens with
  MySQL, whereas it never ever (with the exception of faulty
  hardware of  course) happens with any other RDBMS - including
  PostgreSQL.
Funny. Googling with right keywords paints a bit different picture. Must be some other PG, I guess.

Re: Why doesn't Quora use PostgreSQL

#62

Earlier quoted context omitted.

irc chat, generally on the 'freenode' irc server - http://freenode.net/

Wow, really? Chat? In 2010??? That would never have occurred to me. Thanks!

I'm on irc most days of the week. It's far from dead.

Re: Why doesn't Quora use PostgreSQL

#63
post #50

Earlier quoted context omitted.

note the emphasis on "serious stuff". I did in fact touch MySQL since then in the process of setting up various open source applications that require MySQL. While back then, I needed Postgres for some features MySQL didn't have but otherwise didn't really dislike MySQL, over those 10 years, I really learned to hate MySQL: - try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error me…

So basically you learned to hate MySQL while not doing anything serious with it. Interesting. - try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error message, but instead your data gets truncated at the first byte with the high bit set. False. - "alter table sometable add somcolumn integer not null" will gladly add the column and place null values in each row. Null values that sh…

          - try (erroneously) adding or inserting latin1-data into a UTF-8
          table. You'd expect an error message, but instead your data gets
          truncated at the first byte with the high bit set. 

    False.
http://www.gnegg.ch/2008/02/failing-silently-is-bad/

        - "alter table sometable add somcolumn integer not null"
        will gladly add the column and place null values in each
        row. Null values that should absolutely not be there. No
        error. No warning.

    False.
ok. it inserts them as 0 - that's in improvement from last I checked. Still. It silently does stuff. It should not let me do it in the first place.

Same goes for the date. And please don't tell me the error message you get back there is quite correct. That alter table statement tries to silently add a default and later fails due to the default not being valid.

Also, see this:

    mysql> alter table foo add dob date not null;
    Query OK, 0 rows affected (0.00 sec)
    Records: 0  Duplicates: 0  Warnings: 0

    mysql> describe foo;
    +----------+-------------+------+-----+---------+----------------+
    | Field    | Type        | Null | Key | Default | Extra          |
    +----------+-------------+------+-----+---------+----------------+
    | id       | int(11)     | NO   | PRI | NULL    | auto_increment | 
    | value    | varchar(10) | NO   |     |         |                | 
    | intvalue | int(11)     | NO   |     | NULL    |                | 
    | dob      | date        | NO   |     | NULL    |                | 
    +----------+-------------+------+-----+---------+----------------+
    4 rows in set (0.01 sec)

    mysql> 
this table now contains two columns that can't be null and yet the default is null. Thanks.

Concerning corrupted tables. I have around 1.5 TB of data spread over ~10 databases and over the last 10 years, I never had a corrupt table that I could not trace back to hardware failure (harddrives, raid controllers, RAM).

Over the same period, I had around 200 MB of data spread over ~10 databases in MySQL and I had three cases of corrupt tables that I could not trace back to defective hardware as various diagnostic tools yielded no error and the machines still run without problems with PostgreSQL.

Maybe I'm just unlucky.

Re: Why doesn't Quora use PostgreSQL

#64
post #63

Earlier quoted context omitted.

So basically you learned to hate MySQL while not doing anything serious with it. Interesting. - try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error message, but instead your data gets truncated at the first byte with the high bit set. False. - "alter table sometable add somcolumn integer not null" will gladly add the column and place null values in each row. Null values that sh…

- try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error message, but instead your data gets truncated at the first byte with the high bit set. False. http://www.gnegg.ch/2008/02/failing-silently-is-bad/ - "alter table sometable add somcolumn integer not null" will gladly add the column and place null values in each row. Null values that should absolutely not be there. No error. N…

Maybe you just don't know what you are doing.

Re: Why doesn't Quora use PostgreSQL

#65

Those who commented in favor of postgres: What are some of the biggest deployments of postgres? Facebook has a gargantic deployment of MySQL and it just works. The author of the answer on Quora mentions reliable scalability as the most important factor for their MySQL choice on another answer here: http://bit.ly/dm6HtQ . What is the biggest system that postgres is deployed in?

Some examples:

Skype uses PostgreSQL for their VOIP services.

Yahoo! has a customized PostgeSQL for their data warehousing storing a couple of petabytes of data.

I believe IMDB is another quite prominent user.

Re: Why doesn't Quora use PostgreSQL

#66
This article is an example of choosing easy option over the better option. From a startup's perspective, it's completely understandable. Thousands of cheap MySQL admins, or a few hundred expensive PostgreSQL admins?

As for the "nobody uses PostgreSQL" argument; Facebook and Twitter aren't an endorsement of MySQL because any Linux hosting provider out there will have MySQL installed BY DEFAULT. PostgreSQL would require you to upgrade to a more expensive account (for root access) and install it yourself. As a result, all the hobbyists learn on the free and always available MySQL when building "The Next Big Thing." Remember, Facebook was started in a college dorm room.

Re: Why doesn't Quora use PostgreSQL

#67
post #63

Earlier quoted context omitted.

- try (erroneously) adding or inserting latin1-data into a UTF-8 table. You'd expect an error message, but instead your data gets truncated at the first byte with the high bit set. False. http://www.gnegg.ch/2008/02/failing-silently-is-bad/ - "alter table sometable add somcolumn integer not null" will gladly add the column and place null values in each row. Null values that should absolutely not be there. No error. N…

Maybe you just don't know what you are doing.

Maybe you just have nothing to say and don't recognize that such behavirs are clearly wrong, that failing silently for a database is a case of bad design, and MySQL is just technically inferior to Postgres. Or are we missing something?

Re: Why doesn't Quora use PostgreSQL

#68
post #35

Earlier quoted context omitted.

My guess is that a small ecosystem is bad for pretty much everything other than databases: - Programming languages have libraries - Frameworks have plugins - Operating systems have compatibility issues The best code is the code you don't have to write.

There are a lot of "positive network externalities" in the computer world: the more people use something, the more valuable it is. That's true for databases as well. However, what he's saying is that beyond a certain point, those effects tend to become a bit less important. Java is more popular than Python, for instance, but you can get pretty much anything done that you need to in Python. OTOH, a language like Erlan…

Echoing your point, having a library that can do something is fantastic. Having two is even better when you have a choice on which one feels more comfortable to use and is more suited for your project. Having 25 libraries that do basically the same thing gives diminishing returns because the community is split over which one is better and easier to use, while the majority won't be full featured and with a larger number of bugs overall.

This is not necessarily a black and white scenario that holds true to everything, however. There is no such thing as an absolute generic.

Re: Why doesn't Quora use PostgreSQL

#69
post #65

Those who commented in favor of postgres: What are some of the biggest deployments of postgres? Facebook has a gargantic deployment of MySQL and it just works. The author of the answer on Quora mentions reliable scalability as the most important factor for their MySQL choice on another answer here: http://bit.ly/dm6HtQ . What is the biggest system that postgres is deployed in?

Some examples: Skype uses PostgreSQL for their VOIP services. Yahoo! has a customized PostgeSQL for their data warehousing storing a couple of petabytes of data. I believe IMDB is another quite prominent user.

Tineye.com, for those who have heard of it, also uses PostgreSQL (I set it up). It is mostly a KV store with a metadata join, but it's +1.5 billion rows returning +10 random uncached rows in Originally we used MySQL, which revealed its true face at ~500 million rows. Queries that were Then I did some horizontal partitioning and things got really awesome.

Re: Why doesn't Quora use PostgreSQL

#70

Earlier quoted context omitted.

irc chat, generally on the 'freenode' irc server - http://freenode.net/

Wow, really? Chat? In 2010??? That would never have occurred to me. Thanks!

Should we be doing video chat in 2010? People used telephones 30 years ago, and it's still popular now :-)
Post reply on HN