How do you optimize database performance and schema design when working with complex relational databases and SQL?