+Reduce memory consumption during make db
*Refactoring