Comparative analysis of indexing strategies in PostgreSQL under various load scenarios
- Authors: Zolotukhina D.Y.1
-
Affiliations:
- Issue: No 1 (2025)
- Pages: 21-31
- Section: Articles
- URL: https://ogarev-online.ru/2454-0714/article/view/359385
- DOI: https://doi.org/10.7256/2454-0714.2025.1.73138
- EDN: https://elibrary.ru/UUZPDW
- ID: 359385
Cite item
Full Text
Abstract
The subject of the study is the effectiveness of various indexing strategies implemented in PostgreSQL and their impact on the performance of SELECT, UPDATE and INSERT operations in conditions of different data scales. The object of the study are the B-Tree, GIN and BRIN indexes used to optimize the operation of databases. The author examines in detail such aspects of the topic as the time characteristics of operations, the size of indexes and their resource intensity. Special attention is paid to the impact of data volume on the performance of indexes and their suitability for working with various types of data, including JSONB. The research is aimed at systematizing knowledge about the use of indexes to improve the efficiency of highly loaded systems, which require optimization of access operations, updating and inserting data, as well as analysis of resource consumption. The leading research method is an empirical approach, which includes the development of a test database with orders, customers, and products tables. Experiments were conducted for SELECT, UPDATE, and INSERT operations on small, medium, and large amounts of data. The metrics of query execution time and index size obtained using PostgreSQL tools were used for the analysis. The novelty of the research lies in conducting a comprehensive performance analysis of the B-Tree, GIN, and BRIN indexes in PostgreSQL when performing typical operations on various amounts of data. The main conclusions of the conducted research are recommendations on the choice of indexes depending on the types of queries and their execution conditions. B-Tree indexes have proven their versatility, demonstrating high performance for SELECT and UPDATE operations. GIN indexes have shown advantages for working with JSONB data, but their use is limited by high resource intensity. BRIN indexes have proven to be effective for large amounts of data, especially for SELECT operations, due to their compactness and low overhead. A special contribution of the author to the research of the topic is the creation of recommendations for database developers, which makes it possible to improve application performance by choosing an optimal indexing strategy.
References
Домбровская Г. Оптимизация запросов в PostgreSQL. М.: ДМК-Пресс, 2022. Mostafa A. S. A Case Study on B-Tree Database Indexing Technique // Journal of Soft Computing and Data Mining. 2020. № 27-3. URL: https://penerbit.uthm.edu.my/ojs/index.php/jscdm/article/view/6828 (дата обращения: 10.01.2025). Borodin A., Mirvoda S., Porshnev S., Ponomareva O. Improving generalized inverted index lock wait times // Journal of Physics: Conf. 2018. №944. URL: https://iopscience.iop.org/article/10.1088/1742-6596/944/1/012022/pdf (дата обращения: 10.01.2025). Borodin A., Mirvoda S., Kulikov I., Porshnev S. Optimization of Memory Operations in Generalized Search Trees of PostgreSQL // Communications in Computer and Information Science. 2017. № 716. URL: https://link.springer.com/chapter/10.1007/978-3-319-58274-0_19 (дата обращения: 10.01.2025). Рогов Е. В. PostgreSQL 16 изнутри. М.: ДМК Пресс, 2024. Морозов С. В., Нестеров С. А. Сравнительный анализ типов индексов в СУБД SQL Server и PostgreSQL // SAEC. 2024. № 2. С. 485–491. Селиванов Е. О. Сравнение типов индексов в различных системах управления базами данных // Молодежь и наука: актуальные проблемы фундаментальных и прикладных исследований: Материалы VI Всероссийской национальной научной конференции молодых учёных. Комсомольск-на-Амуре: Комсомольский-на-Амуре государственный университет, 2023. С. 357–361. Кудашов А. С., Агапова В. А., Дьячков Д. А., Казакова И. А. Обзор типов индексов и их применение в системах управления базами данных // Современные цифровые технологии. Материалы II Всероссийской научно-практической конференции. Барнаул: Алтайский государственный технический университет им. И. И. Ползунова, 2023. C. 299–303. Documentation PostgreSQL 15 – URL: https://www.postgresql.org/docs/15/release-15-2.html (date of access: 10.01.2025). Сорокин В. Е. Хранение и эффективная обработка нечетких данных в СУБД PostgreSQL // Программные продукты и системы. 2017. № 4. URL: https://app.amanote.com/v4.1.10/research/note-taking?resourceId=Pprz23MBKQvf0Bhi37cu (дата обращения: 10.01.2025). B-tree индексы в базах данных на примере PostgreSQL. – URL: https://techtrain.ru/talks/e2273ec8ca2b4ea692c65318a50c4be5 (дата обращения: 10.01.2025). Меджидов Р. Г. Анализ многоколоночных индексов баз данных // Актуальные проблемы прикладной математики, информатики и механики : Сборник трудов Международной научной конференции. Воронеж : Научно-исследовательские публикации, 2019. C. 420–422. Богатов И. В. Эффективная оптимизация запросов в СУБД Postgres / Академическая публицистика. 2022. № 5-2. C. 59–64.
Supplementary files

