On 25 Cze, 19:13, Eric Chamberlain <e...@rf.com> wrote:
> Hello,
>
> We have a new project and are debating whether to use postrgresql (Amazon 
> EC2) or MySQL with InnoDB tables (Amazon RDS).  It looks like our TCO would 
> be much lower using Amazon RDS.
>
> Our past Django experience has been with postgresql, does MySQL InnoDB have 
> any problems with Django's transaction middleware?
>
> We aren't using any custom fields, are there functional differences between 
> the two databases that would impact how we use Django?  
>

Take a look at this: 
http://www.slideshare.net/gplessis/mysql-on-amazon-rds-vs-ec2
RDS is pretty much a no-brainer, but it cannot be tuned like a custom
instance.

Regarding transactions - I have experience with one medium-sized
startup running on RDS (so it's MySQL+Innodb, formerly it was custom
instance but they switched for convenience), and things Just Work As
Advertised, but you have to remember about one subtle detail, that I
once commented here:

http://stackoverflow.com/questions/2235318/how-do-i-deal-with-this-race-condition-in-django/2235624#2235624

Other than that everything has so far been smooth, at least in my
operations.

Ah, and to save you pulling your hair:
- create MySQL database with CREATE DATABASE name CHARACTER SET UTF8;
- set DATABASE_OPTIONS to {"init_command": "SET
storage_engine=INNODB",}, at least for syncdb. Otherwise your tables
might be created as MyISAM.
Both of these are documented:
http://docs.djangoproject.com/en/dev/ref/databases/#creating-your-database
http://docs.djangoproject.com/en/dev/ref/databases/#creating-your-tables
- but it's easy to overlook them

As for comparision between MySql+InnoDb and PostgreSQL, I don't have
that much experience with the latter so I won't comment on this.
Two transaction-related differences that I'm aware of are:
- PostreSQL requires ROLLBACK of failed transaction, whereas MySQL
doesn't;
- MySQL backend doesn't support savepoints, even though MySQL itself
handles them. I asked this question on this group some time ago
(http://groups.google.com/group/django-users/browse_thread/thread/
ea3421933ea8c199), but noone answered.

--
Tomasz Zielinski
http://pyconsultant.eu

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to