Boosting E-commerce Performance with Database Optimization and Cost Attribution