| MySQL | PostgreSQL |
|---|
| Category | database engine | database engine |
|---|
| Developer | Oracle | PostgreSQL Global Development Group |
|---|
| Created by | Michael Widenius, David Axmark, Allan Larsson | Michael Stonebraker |
|---|
| First release | 1995 | 1996 |
|---|
| License | GPL-2.0 | PostgreSQL License |
|---|
| Open source | Yes | Yes |
|---|
| Pricing | Free with paid plans | Free |
|---|
| Website | https://www.mysql.com | https://www.postgresql.org |
|---|
| Written in | C, C++ | C |
|---|
| Data model | Relational | Relational, Document |
|---|
| Storage layout | Row-oriented | Row-oriented |
|---|
| Workload | Transactions (OLTP) | Transactions (OLTP) |
|---|
| Analytics architecture | Not an analytics platform | Not an analytics platform |
|---|
| Query language | SQL | SQL |
|---|
| ACID transactions | Yes | Yes |
|---|
| Schema | Strict | Strict |
|---|
| Deployment | Server, Managed cloud | Server, Managed cloud |
|---|
| Scaling | Replication | Replication |
|---|
| Create, read, update, delete | Create: fast (Quick inserts with InnoDB); Read: fast (Fast primary key and index lookups); Update: fast (In-place updates with undo logs); Delete: fast (Cheap deletes, space reused by InnoDB) | Create: fast (Fast single and bulk inserts, COPY for loads); Read: fast (Rich indexes and a mature planner); Update: moderate (MVCC writes a new row version, vacuum cleans up); Delete: moderate (Rows are marked dead until vacuum reclaims them) |
|---|