Improve db performance