If I remember right, though, mostly because their use pattern was more like a key value store, and MySQL worked better for that pattern.
Well, it's also quite a misleading read as the numerous rebuttals will point out:
http://rhaas.blogspot.co.uk/2016/08/ubers-move-away-from-pos...
https://blog.2ndquadrant.com/thoughts-on-ubers-list-of-postg...
http://use-the-index-luke.com/blog/2016-07-29/on-ubers-choic...
really uber should not taken as an example, especially since they failed so hard with their databases in the past.
(I'm a Postgres fan, yes, but I think that there a valid reasons to migrate to MySQL (there are several other companies who use mysql, etc but Uber's stuff is just plain FUD))
So... not in all cases
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO ...
SET FOREIGN_KEY_CHECKS = 1;
Now you might have data in your database that's actually incorrect. begin; alter table t2 disable trigger all;
insert into t2 (t1_id) values (20);
alter table t2 enable trigger all;
commit;
Setting constraints to deferrable/initially deferred[1] is probably a nicer way for any non-insane thing you're trying to achieve with such, though :)[1] https://www.postgresql.org/docs/9.6/static/sql-set-constrain...
SET session_replication_role TO 'replica';
We need this to load the data in without worrying about table order, or even individual row order for foreign keys that reference their own table.And we'll all try and forget this feature exists when we're done!
The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data.
The following should be a problem but are accepted by MySQL
- missing group by clauses
- all of the `ignore` commands (insert, alter table, etc.) - incorrect dates
- not enforcing foreign key constraints