Database management systems (DBMSs) are used commonly in companies today for many purposes, for that reason, DBMSs has two types of data processing systems; a) On-Line Analytical Processing (OLAP) systems, b) On-Line Transaction Processing (OLTP) systems, each has its own use. However, in DBMSs, the energy is highly consumed by servers which are used to store data of these large DBMSs, which lead to an energy issue for the last four years or so. Researchers who searched for means to reduce the energy choose one of two methods; the first is hardware improvement, and the other is software improvements, in which conducted on OLAP & OLTP systems. The results achieved on software improvement on OLTP & OLAP systems were acceptable for the case of OLTP systems (i.e. reducing 19% of energy consumption [13]). However, it was not the same for OLAP systems (i.e. only reducing 3.3% of energy consumption [13]). The goal of our research is to design an energy-aware optimizer that finds optimal costs which reduces the energy consumption of a given query in OLAP system up to 20%. Furthermore, we use Randomized Algorithms (RAs) along with the flip rules in the query optimizer in order to find the most optimal plan (in terms of execution time and energy cost). Our optimizer achieved reducing the energy consumption in OLAP systems by reducing 84.65% of energy consumption. In addition, our optimizer checks for all possible solutions when the RAs find an optimal plan to insure it is the best plan.