rails from 3-2-stable branch, database performance improvements