Effective Cost Estimation Techniques for Scaling and Enhancing Database Performance