- Опубликовано
Redundant stats slow Postgres? Sample pg_stat
- Автор

- Имя
- Новости нашего ИТ
- Telegram
Новости нашего ИТ12 подписчиков6774 постаДанный канал является агрегатором технических статей нашего любимого ИТ, так что кто устал листать тысячи сайтов в поиске технических статей присоеденяйтесь к каналу и наслаждайтесь #it_news
Кратко
Как уменьшить нагрузку pg_stat_statements в PostgreSQL с помощью сэмплинга?
Redundant statistics slow down your Postgres? Try sampling in pg_stat_statements
#databases
pg_stat_statements is the standard PostgreSQL extension used to track query statistics: number of executions, total and average execution time, number of returned rows, and other metrics. This information allows to analyze query behavior over time, identify problem areas, and make informed optimization decisions. However, in systems with high contention, pg_stat_statements itself can become a bottleneck and cause performance drops. In this article, we will analyze in which scenarios the extension becomes a source of problems, how sampling is structured, and in which cases its application can reduce overhead.