Improve sp db