much better db config