Db up

Database optimizations