Use smaller test databases and optimize tests