Re: Log size in bytes of query result

Поиск
Список
Период
Сортировка
От Franklin Haut
Тема Re: Log size in bytes of query result
Дата
Msg-id CAN1QLZJG94cHDr-J0m-V3g8cTbE2JuXzzcX5TeGp+Q524EMq2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Log size in bytes of query result  (Sergei Kornilov <sk@zsrv.org>)
Ответы Re: Log size in bytes of query result  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-performance
@Sergei and @Laurenz  Thank you for reply.

I think it is important to have other resource indicators consumed by the query besides the execution time as the amount of Bytes sent / received by each query, how many blocks / bytes were read / written from the cache or had to be loaded from the disk or even CPU cycles .

With this information we can make more efficient adjustments to the queries and improve the management of the resources, especially in virtualized environments, where we often can not identify the real reason for poor performance delivery, whether it is in the structure modeling or if there is a dispute over resources by other virtual machines.

By my analysis, I see that the most efficient way to perform this control would be in the existing medium in postgresql that is the log file (pg_log) adding a few more variables for each query executed.

* Bytes Received (ethernet)
* Bytes Sent (ethernet)
* Bytes Written (disk)
* Bytes read only cache (cache hit)
* Bytes Read from disk  (cache miss)
* CPU Time

Unfortunately I do not have the necessary knowledge to assist in the implementation of these features and I want to leave it as a suggestion for a new version.

regards,

Em sex, 10 de mai de 2019 às 13:42, Sergei Kornilov <sk@zsrv.org> escreveu:
Hi

> extension that hooks into PostgreSQL

We have any hooks that can be used for such purposes?
Sometimes I think how to implement counters "bytes sent to client"/"bytes recv from client" in pg_stat_statements but did not found good place. Where we can accumulate such counters and how they can be accessible from extension? Extend DestReceiver or add counter directly in src/backend/libpq/pqcomm.c ?

PS: some returned with feedback old patch: https://www.postgresql.org/message-id/flat/CAHhq2wJXRqTMJXZwMAOdtQOkxSKxg_aMxxofhvCo%3DRGXvh0AUg%40mail.gmail.com

regards, Sergei


--
Atenciosamente,


Franklin Haut

В списке pgsql-performance по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Use Postgres as a column store by creating one table per column
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Log size in bytes of query result