Skip to content

Instantly share code, notes, and snippets.

@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
@txus
txus / show_stack.rb
Created June 13, 2011 14:47
Rbx bytecode helpers - draft
class Rubinius::Generator
# Shows the topmost element on the stack and the stack's current size.
#
# Calling #show_stack neither consumes nor produces stack, it's just used
# for debugging the current state.
#
# @param [String] name an optional label to print out, to make debugging
# easier.
#
def show_stack(name = nil)