I wonder what PostgreSQL does, as it's much much faster than MySQL.
Faster at what? MySQL, like OpenLDAP, has a dozen or so backends to choose from. In what context does the above statement mean anything? If you're talking about transactions, disk I/Os, different database backend libraries, etc., that's not interesting here. I was specifically talking about in-memory data.
I was talking about in general, going by what I saw at this years PostgreSQL Day, specifically http://spring2008.ukuug.org/talk_abstracts.html#41