In the last few years, we have been seeing a significant increase in research about the energy efficiency of hardware and software components by both academic and industry. Today, energy efficiency is one of the most challenging issues in the area of information technologies and communication. In data-centric applications, database management systems are one of the major energy consumers, in which, a large amount of data is queried by complex queries running daily. Designing and implementing of an energy-aware DBMS that enables significant energy conservation while processing queries become a necessary need. Traditionally, existing DBMSs focus to high-performance during query optimization phase, while totally ignoring the energy consumption of the queries. In this paper, we propose a methodology, supported by a tool called EcoProD, focusing on query optimizers. To show its effectiveness, we implement it in Post-greSQL DBMS aiming reducing energy consumption without degrading query response time. A mathematical cost model is used to estimate the energy consumption. Its parameters are identified by a machine learning technique. We conduct intensive experiments using our cost models and a measurement tool dedicated to compute energy using dataset of TPC-H benchmark. Based on the obtained results, a probabilistic proof to demonstrate the confidence bounds of our model and results is given. CCS Concepts: Information systems-Relational database model; DBMS engine architectures; Database query processing; Relational database query languages;