| I will respond only to Q1, taking the perspective of analytics and data science. Answer: PostgreSQL > MySQL Postgres implementation of SQL includes a few useful clauses that are useful for analytics that MySQL does not support. It used to be that MySQL had no window functions, and that made it wholly inferior to Postgres when it came to analytics. However, it seems MySQL began supporting window functions two years ago, so that is no longer a reason to choose one over the other. There are at least two features supported in Postgres that are not available in MySQL that I use often enough to care: • SELECT DISTINCT ON • FULL OUTER JOIN Having these saves dev time. It is possible to implement either using MySQL, but your code will be more verbose, creating more opportunities for error. If you care about analyzing the data for data-scientific purposes, you would be better off using Postgres. It isn't just the couple of extra clauses. It's also having more (useful) indexing choices and little choices like being able to use two pipes (||) to concatenate strings instead of CONCAT(). |
https://stackoverflow.com/questions/1023347/mysql-selecting-...