Another “Mysql Doesn’t Do that?!” Moment

http://adam.blog.heroku.com/past/2008/9/3/ddl_transactions/

I think the real reason there was resistance to this change is that MySQL doesn’t support DDL transactions; and wrapping migrations in a transaction is mostly pointless without this feature. Since MySQL doesn’t support it, most Rubyists don’t know what DDL transactions are – so here’s a quick primer on this incredibly useful and certainly underrated feature.

DDL = data definition language, also known as the schema. DDL commands include CREATE TABLE, DROP TABLE, ALTER TABLE, and CREATE INDEX. DDL transaction support means that the following sequence of SQL commands will not modify your database

I never even thought of that. I was fairly confident in my vision of Postgres getting faster and faster, and Mysql become a “real” database… that the two systems were converging on something resembling a common speed/feature set. But things like this still occasionally rear their ugly heads and I’m happy to be a Postgres user.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s