views:

1776

answers:

6

My Django project is going to be backed by a large database with several hundred thousand entries, and will need to support searching (I'll probably end up using djangosearch or a similar project.)

Which database backend is best suited to my project and why? Can you recommend any good resources for further reading?

+1  A: 

Please go through

http://articles.techrepublic.com.com/5100-10878_11-1050671.html

and decide

Some more articles for recent one http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL

http://www.databasejournal.com/features/mysql/article.php/3288951/PostgreSQL-vs-MySQL-Which-is-better.htm

http://versus.bix.yahoo.com/vs/MySQL-vs-PostgreSQL

lakshmanaraj
the information in that link is 6 years old and a lot of it is outdated
tliff
@tiff: added recent sites
lakshmanaraj
+2  A: 

Go with whichever you're more familiar with. MySQL vs PostgreSQL is an endless war. Both of them are excellent database engines and both are being used by major sites. It really doesn't matter in practice.

Joonas Pulakka
+10  A: 

large database with several hundred thousand entries,

This is not large database, it's very small one.

I'd choose PostgreSQL, because it has a lot more features. Most significant it this case: in PostgreSQL you can use Python as procedural language.

vartec
+8  A: 

As someone who recently switched a project from MySQL to Postgresql I don't regret the switch.

The main difference, from a Django point of view, is more rigorous constraint checking in Postgresql, which is a good thing, and also it's a bit more tedious to do manual schema changes (aka migrations).

There are probably 6 or so Django database migration applications out there and at least one doesn't support Postgresql. I don't consider this a disadvantage though because you can use one of the others or do them manually (which is what I prefer atm).

Full text search might be better supported for MySQL. MySQL has built-in full text search supported from within Django but it's pretty useless (no word stemming, phrase searching, etc.). I've used django-sphinx as a better option for full text searching in MySQL.

Full text searching is built-in with Postgresql 8.3 (earlier versions need TSearch module). Here's a good instructional blog post: Full-text searching in Django with PostgreSQL and tsearch2

Van Gale
A: 

Will this application be hosted on your own servers or by a hosting company? Make sure that if you are using a hosting company, they support the database of choice.

awithrow
+3  A: 

For whatever it's worth the the creators of Django recommend PostgreSQL.

If you're not tied to any legacy system and have the freedom to choose a database back-end, we recommend PostgreSQL, which achives a fine balance between cost, features, speed and stability. (The Definitive Guide to Django, p. 15)

oivvio