Do you have a succes story of MySQL (preferably 8+) over Postgres while using Ecto/ Phoenix?

Hi everyone!

I’ve been using Postgres in a Phoenix application for the last couple of years and I’m looking for reasons to try MySQL in a new project. Mainly because I’m getting tired of some Postgres particularities, like not being able to properly / easily reorder table columns among other things.

I’ve toyed around with MySQL in another project in the past, but unfortunately, the project was very limited in scope, so I didn’t have the chance to stress the MyXQL driver enough.

This new project I’m working on will have to deal with a large dataset (I’m currently testing a basic setup with 80k+ rows of curated content), geolocation, and a lot more reading than writing.
I started using Postgres but I’m looking into MySQL 8 because it seems it’s a viable contender nowadays. Also, I’m looking into the ease of use factor, since MySQL is still one of the most well-known databases.

I’m assuming that since Postgres is the default database in a new Phoenix application it is preferred over MySQL by the core team. But I’m not sure if this is a matter of preference or support/ maturity.

So, I’d like to hear from you: Do you have a real use case of MySQL over Postgres? Are you working on a MySQL project right now? What are you missing from Postgres, any gotchas? And so on…

Wow it seems that my post got buried among the new ones this week.
Just going to bump this up to see if it gets more traction :rocket:.

I don’t have any direct experience (only pre-product research) with this, but one reason to use MySQL is, IIRC, the distributed solution (galera) is generally considered to be easier than distributed postgres. Not even sure if there is a dominant distributed postgres. Greenplum maybe? Citus?

We were looking into MySQL since we needed HA on-prem services, but my project got cancelled before deploy.

Not MySQL but used the MyXQL adapter for Ecto together with Dolt DB GitHub - dolthub/dolt: Dolt – It's Git for Data

Dolt speaks MySQL dialect so it just works. What you get is sql data with git-like features. Pretty cool stuff.

2 Likes

Or aren’t a ton of stories where MySQL ends up being preferred in the Elixir community :stuck_out_tongue_winking_eye:

3 Likes

Hey guys, thanks for the replies so far…

@ityonemo Seems that you have/ had an interesting use case there. Could you share a little bit more about your project constraints and how MySQL solved it for you? (Also, what’s exactly is IIRC? I don’t think I’ve heard about that before).

@egze This is one of the things I wanted to hear… I don’t know why but I wasn’t thinking about the MyXQL adapter as something as first-class as the Postgrex adapter. (About Dolt: Man, this is crazy cool! I’ll check it out in the future for sure)

@benwilson512 Fair enough hahaha - any battle stories to share?

“If I remember correctly”.

2 Likes

In my defense, I’m not a native english speaker, so I thought that was the initials for something related to MySQL that I didn’t know about :sweat_smile:.