MySQL vs PostgreSQL
When comparing MySQL vs PostgreSQL, the Slant community recommends PostgreSQL for most people. In the question“What is the best database for backend web development?” PostgreSQL is ranked 2nd while MySQL is ranked 4th. The most important reason people chose PostgreSQL is:
JSON data can be stored as a column with optional indexes. It's like the best of the NO-SQL world without having to give up ACID and Relationships. This means that cascading deletes can be done in a single Transaction across multiple JSON documents.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Scalable
MySQL is made to handle a lot of data and to be used in large applications. This makes it extremely scalable and fast, even under a lot of workload.
Pro Multiple third-party tools that help working with MySQL
Since MySQL is one of the most popular relational databases, maybe the most popular, there exist many third-party tools and applications that help developers to use MySQL in their development.
Pro Easy to start working with
Because of it's popularity there are a lot of tutorials and guides out there that help developers install and work with MySQL. The installation process itself is not very hard and there are multiple powerful GUI tools that make it extremely easy to work with MySQL for a beginner.
Pro JSON datatype
JSON data can be stored as a column with optional indexes. It's like the best of the NO-SQL world without having to give up ACID and Relationships. This means that cascading deletes can be done in a single Transaction across multiple JSON documents.
Pro Advance access capabilities
Great security and inbuilt access management. Possible to configure row level access.
Pro Open source license
PostgreSQL is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses. A mirror of the source code can be found on GitHub
Pro High performance
PostgreSQL performance increases with each release, this is also proven by many benchmark tests.
Notable performance features include:
As PostgreSQL only supports one storage engine, it has been able to integrate and optimise it and with the rest of the database. This has resulted in multiple benefits such as the ability to allow different transaction types to co-exist efficiently without the need to select storage engine types once for each table ahead of time.
On the fly data compression resulting in less IO required for reading.
Asynchronous + synchronous Replication.
PostgreSQL supports a asynchronous API for use by client applications. It is reported to increase performance by up to 40% and is not supported by MySQL.
Designed to scale very well with large numbers of cores at high concurrency levels.
Cons
Con Error messages usually are not very detailed
When you are trying to do something in MySQL and something goes wrong it will simply give you an error message with an error code. Which does not say much about what went wrong unless you look it up online. This can be a little cumbersome during development.
Con pgAdmin 4
The newest version of pgAdmin, written in Python and jQuery with Bootstrap, using the Flask framework, is not an improvement, it's bloated and not very intuitive. Some alternatives can be found here
Sadly also in the installers for older versions like PostgreSQL 9.6 the original pgAdmin was replaced by this version.