News for hackers. Stuff that matters.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by mmaunder on Wednesday April 26, 2023 @03:06PM (#35718481)
I must admit as a web practitioner since 1994 I have a bit of an issue with this:

> In the 2000s, the conventional wisdom selected MySQL because rising tech stars like Google and Facebook were using it. Then in the 2010s, it was MongoDB because non-durable writes made it “webscale“. In the last five years, PostgreSQL has become the Internet’s darling DBMS. And for good reasons!

Different DB's, different strengths and it's not a zero sum came as implied. MySQL was popular before Google was born - we used it heavily at eToys in the 90s for massive transaction volume and replacing it with Oracle was one of the reasons for the catastrophic failure of eToys circa 2001. MongoDB gained traction not because it's an alternative to MySQL or PostgreSQL. And PostgreSQL's marketshare today is on a par with Mongo and both are dwarfed by MySQL which IMO is the true darling of web DB's given it's global popularity.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by LambdaComplex on Wednesday April 26, 2023 @04:00PM (#35719169)
> in the 2010s, it was MongoDB because non-durable writes made it “webscale“

I think this is the best video on that topic: https://www.youtube.com/watch?v=b2F-DItXtZs

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Wednesday April 26, 2023 @06:28PM (#35720854)
A non-trivial component to MySQL popularity was that easy installation (not necessarily administration) and comparatively low resource usage with good performance at default settings (even today one needs to run some basic calculations for postgres in production, IMO) meant that cheapest possible dynamic hosting using Linux, Apache, PHP3, and MySQL 3, was what simply was the only available option for many. This codified LAMP stack, people learned from tutorials/courses/word of mouth how to write web apps with PHP and MySQL, used cheap LAMP hosting, optionally installed LAMP servers themselves, etc.

This also led to popularity of bigger reselling setups (I don't miss installing cpanel...) and services like Dreamhost.

MySQL in this way gained a virtuous cycle completely unrelated to Google. Hell, most people I know, who dealt with LAMP space for years, never knew Google had anything to do with MySQL (most people that knew about it were... Lispers. Because of who built the first version of Google Ads)

Even Mac OS X Server shipped with MySQL and PHP because of that, in 2001.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by jasonwatkinspdx on Wednesday April 26, 2023 @08:05PM (#35721595)
Another factor besides performance vs earlier versions of Postgres (they're now more at parity) was Postgres didn't come with replication included. I think that was a big hinderance for adoption during the LAMP stack's hey day.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Wednesday April 26, 2023 @08:07PM (#35721608)
Honestly, at the time when LAMP was gaining the userbase, said userbase for considerable portion did not care about replication because there was only one server they had.

Replication was something you did when you got succesful enough to have it, or were a MSP providing it at premium to others.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by edmundsauto on Wednesday April 26, 2023 @09:26PM (#35722128)
I remember it differently - we needed replication for "hot" backups. At that time, scalability was a major issue - so anyone (including businesspeople) wanted to have a scalable architecture. MySQL spoke to the practical (default install on cPanel hosts, easy replication) and the aspirational (you're going to blow up and need to scale).

Digg.com also had a really influential technical team - hearing about how they did things set a lot of baseline defaults for a lot of people.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Wednesday April 26, 2023 @09:39PM (#35722212)
maybe you were on the more funded side of history in this. As for me, Digg is way after LAMP got solidly plonked into "what I need for a dynamic website on cheap".

Essentially, start at 2000-2001 and more and more people going into running websites for all kinds of reasons (forums, blogs, webshops, etc. often hosted on low end offerings)

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by edmundsauto on Thursday April 27, 2023 @02:13PM (#35732296)
I didn't enter the workforce until 2004, so yeah missed some of the early early days of PHP/MySQL. I used it for government work, was definitely not well funded haha! But I suspect digg started with MySQL b/c of similar reasons as anyone else, then helped amplify the cycle.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by int_19h on Thursday April 27, 2023 @03:27PM (#35733326)
"Cheap" is the key word here, and that usually meant shared hosting, which was like 99% MySQL.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by zaphirplane on Wednesday April 26, 2023 @07:27PM (#35721330)
Part of the popularity of the early MySQL was marketing. I hope I’m not wrong here, there was something written about MySQL people posting misinformation in forums. Another is the ease of having it up and running. Another was I think there was some IP address component to setting up users which made it look complicated
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by rodgerd on Wednesday April 26, 2023 @10:25PM (#35722584)
> there was something written about MySQL people posting misinformation in forums.

They were absolute liars of the first water back in the day, absolutely. In the 3.x era there were claims that transactions were only for people who didn't know how to program! You'd struggle to find most of the absolute nonsense that was being pushed, because it's mostly gone down various memory holes, but it was absolutely breathtaking.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by hodgesrm on Wednesday April 26, 2023 @07:38PM (#35721399)
> A non-trivial component to MySQL popularity was that easy installation

...Along with replication and being joined with the hip to PHP. As to installation, there was a point in time in the early 2000s where you could sudo to root, type 'mysql' and be talking to a live MySQL on most Linux distros that I used. No wonder a lot of people defaulted to it.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Wednesday April 26, 2023 @08:05PM (#35721597)
Replication came later - but the fact that you could do

  sudo apt-get install mysql-server mysql-client
  sudo -i mysql
and be logged in as admin into mysql database was indeed a huge reason for defaulting to it.

EDIT: Of course, at that time, there was no Ubuntu teaching everyone to sudo all the time, so drop all instances of sudo and add a su - at start ;)

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by tomnipotent on Wednesday April 26, 2023 @09:09PM (#35722012)
MySQL has had replication since May 2000.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Wednesday April 26, 2023 @09:31PM (#35722162)
Replication being easier as driver for developers defaulting to MySQL
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by masklinn on Thursday April 27, 2023 @01:41AM (#35723732)
Mysql also came with pretty much any webhost.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by p_l on Thursday April 27, 2023 @05:53AM (#35725676)
That's exactly my point. A lot of people started with dynamic websites by using cheap webhosting that you FTP'ed your PHP files to, and used PhpMyAdmin to manage your smallish database, and 2000-2009 they still formed a strong portion of market for starting out (I chose 2009 because that's when EC2 becomes more accessible for this due to RDS)
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by porker on Thursday April 27, 2023 @02:13AM (#35723925)
> Of course, at that time, there was no Ubuntu teaching everyone to sudo all the time

Maybe that's why I am used to logging in as root rather than a user. I started in 1999 and have been surprised how few users now do

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by flumpcakes on Thursday April 27, 2023 @03:33AM (#35724511)
Most prod configs I've seen now days disable SSH-ing in as root and password auth so it just becomes:

$ ssh user@server <rsa key> $ sudo -i <user pass> #

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by ExoticPearTree on Thursday April 27, 2023 @12:10PM (#35730262)
Yes, replication. MySQL made it dead easy to have DB clusters in minutes.

I'd wish PostgreSQL would have as simple when it comes to replication and failover like MySQL does. It's always a pain when switching masters back and forth.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by osigurdson on Wednesday April 26, 2023 @07:45PM (#35721446)
>> MySQL which IMO is the true darling of web DB's

A "darling" is something you want to use, not something that you are using. Many do not want to use MySQL due to Oracle control. Postgres is definitely the darling of the past few years.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by pier25 on Wednesday April 26, 2023 @08:05PM (#35721593)
> MongoDB gained traction not because it's an alternative to MySQL or PostgreSQL.

Honestly I think it only gained traction because many Node devs refused to learn SQL and the document model is familiar because it's closer to JSON data.

These days Mongo is good but that wasn't the case back 10+ years ago.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by inferiorhuman on Thursday April 27, 2023 @01:24AM (#35723634)
Mongo was so comically bad. I remember trying to sort through a slow query and thought: ah ha! I'll just add an index. Unfortunately on that version of Mongo, creating an index would occasionally just crash the server process.

I think Mongo became popular because it's ad tech and those guys knew how to be buzzword compliant. JSON-esque documents are one thing, but Mongo is Javascript to the core. All of a sudden your JS devs don't have to learn SQL they can just shit out some queries in javascript. Of course that came with some pretty severe drawbacks.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by The_Colonel on Thursday April 27, 2023 @04:18AM (#35724852)
As I remember, MongoDB got popular before node.js, so there wasn't really a lot of backend JavaScript developers out there to make a difference.

We first used Mongo ~11 years ago with Java. For us the benefit was that we could dump unstructured data into it quickly, but still run queries / aggregations on it later.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by orthoxerox on Thursday April 27, 2023 @04:19AM (#35724856)
My favourite story about MongoDB is that it was so bad and popular at the same time that when a competitor developed a wire-compatible database that was miles better they simply bought it and released it as the next version of MongoDB.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by pier25 on Thursday April 27, 2023 @09:28AM (#35727797)
which db was that?
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by orthoxerox on Thursday April 27, 2023 @09:36AM (#35727902)
I think I meant WiredTiger.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by aries185 on Friday April 28, 2023 @10:35AM (#35741755)
This is true. And now MongoDB is miles better.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by steve_taylor on Wednesday April 26, 2023 @09:10PM (#35722020)
PostgreSQL became the internet's darling DBMS long before that. Oracle's acquisition of MySQL in 2008 made people finally take notice of PostgreSQL. Before that, most developers barely knew it existed.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by tuatoru on Thursday April 27, 2023 @09:56AM (#35728160)
Yeah, Postgresql was the FreeBSD of DBMSes. Solid, conceptually integral, well documented.*

I recall doing an evaluation of open source databases in 2001. MySQL didn't even have row-level locking, let alone any concept of transactions. I summarised it as "easy to use; but only for data you don't care about".

* Not that Postgres (as it was then) was without warts in 2001. A huge one was its "object orientation": table inheritance. What it needed then, and would still be nice to have, is object orientation at data type (column) level, an extension of the SQL domain.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by mickeyp on Thursday April 27, 2023 @11:05AM (#35729250)
You can create types in postgresql and use them as columns... so you can have your "object" style encapsulation at a column level. So you can have a "currency" type that has both the amount and the currency.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by lmm on Wednesday April 26, 2023 @10:52PM (#35722762)
> MongoDB gained traction not because it's an alternative to MySQL or PostgreSQL.

Disagree. It gained traction because it was an alternative to MySQL in the ways that mattered - fast, easy to administer, widely known, good enough. Yes, there are significant differences in the details of what they do - but in terms of someone looking for a backing datastore for their webapp, they're actually competing in a very similar space.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by kragen on Thursday April 27, 2023 @01:53AM (#35723786)
yeah, i was surprised at the cluelessness of that remark. lamp was definitely not a 'rising tech stars' thing. hopefully the author is more careful about accuracy when it comes to database architecture than when it comes to www history

did google even use mysql? certainly if they did they never talked about it publicly in the early 02000s, and of course facebook didn't even exist then

lj, though, they used the fuck out of mysql

/. originally didn't use a database; i (an ordinary user) accidentally posted an article by trying to post a comment on an article that didn't exist yet; i guess they got appended to the same file. but when it did switch to a database (i don't know, about the time google was founded?) it was of course mysql

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by geenat on Thursday April 27, 2023 @04:34AM (#35724983)
MySQL (then Vitess) ran Youtube, but nowadays I do believe most product teams are using Spanner.
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by audioheavy on Thursday April 27, 2023 @12:54PM (#35731023)
Yeah I think (heard anecdotally) both google/YouTube and Facebook (and many others) started with MySQL. Spanner for distributed writes has inspired most implementations although Google is the only one I know about that implements TrueTime (atomic clocks). The same year that the Spanner paper came out (after Percolator) an alternate approach (Calvin) was also published, and some of us are using that (our DB's design is inspired by it, but we've done a lot of enhancements since then).
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by kragen on Thursday April 27, 2023 @03:03PM (#35733028)
youtube did, but google didn't buy youtube until three years before the end of 'the 2000s'
Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by bsg75 on Thursday April 27, 2023 @12:17PM (#35730367)
> Oracle was one of the reasons for the catastrophic failure of eToys circa 2001

Would love to hear a from-the-trenches summary of that.

Re:The Part of PostgreSQL We Hate the Most (Multi-Version Co... by pmontra on Thursday April 27, 2023 @01:49PM (#35731932)
In the early days of the web MySQL was extremely faster than anything else because it was an ISAM file with no support for transactions. That was OK for many people that self-hosted the db on the not very powerful CPUs of the time.

I remember people stating that transactions are useless, and maybe they are for some workloads, see the success of MongoDB years later.

The transactional engine InnoDB was added in version 3.23 [1] in 2001 [2] .

[1] https://en.wikipedia.org/wiki/Comparison_of_MySQL_database_e...

[2] https://en.wikipedia.org/wiki/MySQL