|
|
|
|
|
by sigil
3823 days ago
|
|
> Is there really something about PSQL that makes it better than MySQL these days? In a word: correctness. Yes, MySQL has an UPSERT implementation. Like so many things MySQL rushed out the door, it's also buggy and unpredictable. Did you know UPSERTing into a MySQL table with multiple unique indexes can result in duplicate records? Did you know MySQL's ON CONFLICT IGNORE will insert records that violate other not-NULL constraints? [1] I've used both MySQL and PostgreSQL for over a decade, and working around the many MANY misbehaviors and surprises in MySQL requires continuous dev effort. PostgreSQL on the other hand is correct, unsurprising, and just as performant these days. MySQL is what happens when you build a database out of pure WAT [2]. [1] https://wiki.postgresql.org/wiki/UPSERT#MySQL.27s_INSERT_...... [2] https://www.destroyallsoftware.com/talks/wat |
|
You say "upserting into a mysql table". Which storage engine? MyISAM? InnoDB? I find MySQL to be both reliable and incredible durable i.e. it handles yanking the power cord quite well. The performance also scales up linearly for InnoDB even for very high traffic and concurrency applications.
We use redis, memcached and other storage engines - by no means are we tied to mysql. But for what it does, it does it incredibly well.
I'm also completely open to using PostgreSQL and I was hoping someone could give me a compelling reason to switch to it or to use it.