This email address is being protected from spambots. You need JavaScript enabled to view it.
 
+7 (4912) 72-03-73
 
Интернет-портал РГРТУ: https://rsreu.ru

UDC 004.65

ENERGY EFFICIENCY OF SQL QUERIES IN POSTGRESQL: EXPERIMENTAL STUDY OF MEASUREMENT AND OPTIMIZATION METHODS

D. Rahmani, lecturer, Moscow Technical University of Communications and Informatics, Moscow, Russia; orcid.org/0009-0002-8371-3358, e-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

D.  I.  Grigorenko, student, Moscow Technical University of Communications and Informatics, Moscow, Russia; orcid.org/0009-0007-2014-9215, e-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

With the growing energy consumption of data centers, there is an increasing need to optimize database management systems not only for performance but also for energy efficiency. This study aims to develop a reproducible methodology for directly measuring the energy consumption of SQL queries in PostgreSQL using Intel RAPL hardware counters and to experimentally evaluate the impact of indexing, cache state, and parallelism on energy consumption and Energy-Delay Product (EDP) metric. Experiments were conducted on a table containing 10 million records, each test repeated 25 times to ensure statistical reliability. The re sults show that, at a selectivity of 1 %, index scans reduce energy consumption by 71,9 % and improve EDP by 94,6 % compared to sequential scans. Cache warming reduces the share of energy spent on I/O from 54,9 % to 5,3 %, decreasing total energy consumption from 192,1 J to 68,9 J. The results indicate that the optimal level of parallelism based on EDP metric is achieved with four worker processes; this finding is val id for Intel Core i7-11700 (8-core) configuration. These findings enable practical recommendations for en ergy-efficient PostgreSQL tuning in high-load environments and lay the groundwork for developing «green» query optimizers that consider both performance and energy costs.

Key words: energy efficiency, PostgreSQL, RAPL, indexes, caching, parallelism, EDP, measurement methodology.

 Download