Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which RDBMS do you use with Django and why? [closed]

Tags:

django

rdbms

I recently switched a project from MySQL InnoDB to PostgreSQL, and I feel bigger lags when inserting and updating data with ajax. This may be subjective. I know the Django devs recommend postgres and I know psycopg2 is supposed to be faster than MysqlDB. Personaly I like the way postgres enforces database integrity, but am mostly worried about performance for this project. Want to hear other people's opinion on this.

like image 339
Vasil Avatar asked Nov 22 '08 08:11

Vasil


2 Answers

Why don't you measure? That's the only way to be sure about the performance. Hand waving about how slow or not is something without hard data is like trying to catch water with your hands.

Measure transactions per second or even better, requests per second with a web server stress tool like The Grinder (which can be scripted in Jython) with both MySQL backend and PostgreSQL and afterwards see if that makes a difference. If it does, ask around here, or, more specifically, ask on the pgsql-general or pgsql-performance mailing lists. There are many expert people there which know loads about it, even the main devs. There are tons of knobs on PostgreSQL configuration related to performance.

like image 163
Vinko Vrsalovic Avatar answered Sep 21 '22 18:09

Vinko Vrsalovic


It may be incorrect usage of indexes. Simply making sure you have the right indexes, and making sure the tables are analyzed and vacuumed periodically should give rather decent results.

Even if Postgres turns out to be a minuscule slower, in some cases, my personal opinion is that the features it provides greatly outweigh the minor performance losses.

Postgres really is a beautiful database, and any time I'm using anything else, I wish I was using Postgres.

like image 44
Kent Fredric Avatar answered Sep 21 '22 18:09

Kent Fredric