Choosing MySQL or PostGres on Heroku

33 views
Skip to first unread message

Tim Johnson

unread,
Nov 27, 2019, 6:35:05 PM11/27/19
to MLDjango
Using python 3.7.2, Django 2.1.5 on Linux development workstation with
deployment to Heroku.

I retired several ago, primarily coding in python and mostly working in
legacy CGI systems with MySQL backends and still use mysql on my
workstation.

I am now essentially a hobbyist who wishes to use a django website to
publish articles, memoirs and essays.

Some have urged me to convert to PostGresql as it is "baked into"
heroku. However, my comfort level is with mysql.

Given my situation I'd welcome any reason why I should convert to
postgresgl. I am not interested in stirring up controversy. Should there
be a pressing reason to convert to PG I'd sooner do it now than when
I've a couple of hundred articles published.

Any insights would be appreciated.

thanks

Mike Dewhirst

unread,
Nov 27, 2019, 7:03:04 PM11/27/19
to django...@googlegroups.com
I use PostgreSQL and PGAdmin and find it brilliant. I have also used
MySQL and phpMyAdmin in the past and occasionally helping other more
recently. There is no comparison in my view. PG is far better. There is
plenty of research out there which supports PG over MySQL but my own
experience is simply non-negative (no problems) for PG and since I no
longer use it , inconclusive for MySQL.

I no longer (since last century) have PHP on any of my servers and that
is that.

However, routine examination of server logs shows that most hacking
attempts target phpMyAdmin and other known php weaknesses. I'm not
saying that avoiding php makes my servers more secure just that hackers
seem to love probing phpMyAdmin.

Also, Django seems to expect PostgreSQL and other DBMSs require extra
effort or extra documentation to avoid known problems.

YMMV but my advice is PostgreSQL.

Mike

>
> thanks
>

Leon Vaks

unread,
Nov 28, 2019, 6:08:48 AM11/28/19
to django...@googlegroups.com, t...@akwebsoft.com
Hello Tim,

I was given the same advice to convert to PostgreSQL because PostgreSQL is Horizontally scalable.
I did some research:
Horizontal scaling means that you scale by adding more machines into your pool of resources whereas Vertical scaling means that you scale by adding more power (CPU, RAM) to an existing machine.
MySQL has many different storage engines:
https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html
The most popular storage engine among developers is InnoDB. For MySQL version 8, it can go up to 64 Terabytes per server.
However, storage engine - ndb allows unlimited horizontal scaling by adding nodes. Ndb stands for network db and used by number of telcos and gaming publishers. Ndb is super fast because it is in memory database (similar to SAP Hana); however, it requires more knowledge to setup and configure then Innodb storage engine. Innodb storage engine is more popular among development teams because it is more simple to configure and administer.
Both engines can handle transactions. In addition, both engines can work with SQL data as well as NoSQL data i.e. you do not need to add additional databases like Mongodb. For Big data, using Hadoop and MySQL, use Hadoop Applier. MySQL team developed Analytical Engine which can do data analytics in the cloud; however, I am not sure if this service will be officially available in this coming release.

I hope this helps,
Happy Holiday to Everyone.
Leon


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6a3619c5-6c72-0c80-49c4-de0926a5041f%40akwebsoft.com.


--
Warmest Regards,
Leon.

Tim Johnson

unread,
Nov 28, 2019, 1:38:06 PM11/28/19
to django...@googlegroups.com

Thank you Leon.

Great analysis!


Reply all
Reply to author
Forward
0 new messages