Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS RDS MySql or Postgres - performance wise and cost wise?

I want to use aws for hosting a django application and use aws rds for database purpose. The application is kind of blog like system.

I am not able to decide which RDS I should choose over MySql or Postgres? Both price wise and performance wise according to aws pricing policy.

like image 777
bihari_gamer Avatar asked Dec 24 '22 04:12

bihari_gamer


2 Answers

This can be very broad and may be opinionated , I would try to keep it short as i read it somewhere:

MySQL would be very good for any CMS Site as it works very well with it and MyISAM tables are quite nice here.

From What I read where PostgreSQL does better than MySQL:

  • Multi-application databases
  • Advanced data modelling

What Advance Data Modelling means is that PostgreSQL is far more mature at doing complex data modelling than MySQL is. It has a very mature extensible type system, a wide range of procedural languages, and a great deal of flexibility in how these languages can be plugged into existing queries.

If that wasn't enough, the fact is that you can essentially build your data model in PostgreSQL based not only on what information you are storing but what information is commonly derived from what you are storing. This makes things like not-first-normal-form actually sane to use where they are needed. Add collections and multiple inheritance in table structure and you have a very sophisticated data modelling platform, this blog would help you understand it better.

Besides the content management system market, MySQL's other major market is in applications where data is not expected to be exposed to more than one writing application at a time. This leads to a significant difference in handling data validation, etc.

In PostgreSQL validation is always equally strict. If the app expects special error treatment it had better call functions or casts to handle this explicitly.

MySQL however places the application in charge of defining the data validation rules.So while PostgreSQL allows the relational and object-relational interface to serve as a public API, it is essentially intended largely to be a private API for applications in MySQL. This is a huge difference and not readily understood by many people trying to make the choice. This leads to major differences in application design.

MySQL is a data storage and reporting solution for your application. PostgreSQL is a data centralization, modelling, and reporting solution for your organization. The two are remarkably different.

Now coming to Second Question based on pricing as you can see from MySQL Pricing Page and PostgreSQL Pricing Page MySQL is bit cheaper than PostgrSQL , reading on the answer you can make informed decision what would be best for you.

Hope this Helps!

like image 151
Kush Vyas Avatar answered Dec 25 '22 19:12

Kush Vyas


I'm gonna offer you a 3rd option: Aurora - try it. It's cheaper than those 2 and is MySQL compatible. This article may be of help to you when deciding.

For simple blog-like thingie I'd go with MySQL (or Aurora MySQL compatible version) For data-critical and highly relational solutions I might also consider Postgres (Aurora)

like image 29
Harly H. Avatar answered Dec 25 '22 19:12

Harly H.