Skip to content

Instantly share code, notes, and snippets.

View mikelikespie's full-sized avatar

Mike Lewis mikelikespie

  • Anthropic
  • San Francisco
View GitHub Profile
@newhouseb
newhouseb / gist:1620133
Created January 16, 2012 10:20
MySQL vs PostgreSQL Schema changes benchmarks
The basic idea here is to substantiate the claims made by this square post:
http://corner.squareup.com/2011/06/postgresql-data-is-important.html
In PostgreSQL, and MySQL (MyISAM and InnoDB) I create millions of rows and then add
and remove columns and add and remove indexes. For columns without defaults this is
basically free in PostgreSQL and O(n) in MySQL. For adding indexes its at best O(n)
everywhere, but with PostgreSQL it claims not to do any locking that would otherwise
prevent table interaction.
Also, PostgreSQL has _awsome_ documentation (it has real examples!). I always get