- Newest
- Most votes
- Most comments
Hi there, these are key differences between MySQL & PostgreSQL.
Category | MySQL | PostgreSQL |
---|---|---|
Database technology | MySQL is a purely relational database management system | PostgreSQL is an object-relational database management system |
Features | MySQL has limited support of database features like views, triggers, and procedures | PostgreSQL supports most advanced database features like materialized views, INSTEAD OF triggers, and stored procedures in multiple languages |
Data Types | MySQL supports numeric, character, date and time, spatial, and JSON data types | PostgreSQL supports all MySQL data types along with geometric, enumerated, network address, arrays, ranges, XML, hstore, and composite |
ACID Compliance | MySQL is ACID compliant only with InnoDB and NDB Cluster storage engines | PostgreSQL is always ACID compliant |
Indexes | MySQL has B-tree and R-tree index support | PostgreSQL supports multiple index types like expression indexes, partial indexes, and hash indexes along with trees |
Performance | MySQL has improved performance for high-frequency read operations | PostgreSQL has improved performance for high-frequency write operations |
If you're a developer, you should know that MySQL doesn't yet support “LIMIT & IN/ALL/ANY/SOME subquery” & standard SQL clauses like "FULL OUTER JOINS, INTERSECT, and EXCEPT" as well as Partial Indexes, Bitmap Indexes, and Expression Indexes. However, PostgreSQL is the best choice for developers who have to write complex SQLs. It is a fully SQL-compliant database and supports all SQL standard features. Applications of pretty much any nature from any domain can use PostgreSQL as their database, makes it a popular choice for OLTP, OLAP, and DWH environments.
Since you said new DB should support OLTP as well as ACID transactions preferred, I reckon PostgreSQL is more suitable for you (, but if your team has never used either MySQL or PostgreSQL, usually MySQL is easier to get started with while PostgreSQL is more complex to get started with.
You can figure out more from resources below. https://aws.amazon.com/compare/the-difference-between-mysql-vs-postgresql/
If you have any more questions, feel free to leave a comment below. Thanks!
Relevant content
- asked 5 years ago
- asked 14 days ago
- Accepted Answerasked 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Thank you so much. Is there also differences with regards to multi region support between aurora mysql and aurora postgres? And also, with regards to the number of writers? If you can explain a bit on these, it would be helpful.
Also vacuuming was major issue in Vanila postgres, so does that same behavior exist in aurora postgres?
Hi, hope this helps. Aurora Mysql supports multi region via binlog replication, while Aurora PostgreSQL doesn't support it. But you can use Aurora Global Database. https://docs.aws.amazon.com/prescriptive-guidance/latest/aurora-replication-options/cross-region-aurora-replicas.html Not sure with next question, since there's only one writer per cluster. But you can make 15 read replicas. For vacumm, it's a bit different from standard PG, since Aurora is a managed service. Check this out: https://aws.amazon.com/blogs/database/understanding-autovacuum-in-amazon-rds-for-postgresql-environments/