Merge "Performance improvements for db schema update."