Database optimization

shape