improve the db performance and remove useless config