RE: [Proposal] Add accumulated statistics

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: "Yotsunaga, Naoki" <yotsunaga(dot)naoki(at)jp(dot)fujitsu(dot)com>, 'Bruce Momjian' <bruce(at)momjian(dot)us>, 'Phil Florent' <philflorent(at)hotmail(dot)com>, "'Michael Paquier'" <michael(at)paquier(dot)xyz>, 'Tomas Vondra' <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: [Proposal] Add accumulated statistics
Date: 2019-01-07 01:42:21
Message-ID: 0A3221C70F24FB45833433255569204D1FB62259@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Yotsunaga, Naoki [mailto:yotsunaga(dot)naoki(at)jp(dot)fujitsu(dot)com]
> By the way, you can see the number of wait events with "LWLOCK_STATS", right?
> Is this function implemented because it is necessary to know the number
> of waiting events for investigation?
> If so, is not that the number of wait events is useful information?
> Now, I need to rebuild to get this information and I feel inconvenience.
>
> So, how about checking the number of wait events in the view?
> Also, I think that it will be useful if you know the waiting time.
> I think that it is easy to investigate when it is clearly known how long
> waiting time is occupied with processing time.

That's interesting. It should be convenient for PG developers to be able to see wait events of each session and the whole instance to improve PostgreSQL. I developed a flight recorder feature for a proprietary database (not based on PostgreSQL), which recorded various events, including waits, in the ring buffer for each session. It could dump the ring buffers into external files in CSV format, so that we can load them into a database or a spreadsheet to analyze the time model of SQL execution. That helped us a lot to eliminate many bottlenecks. MySQL says a similar thing about its Performance Schema:

https://dev.mysql.com/doc/refman/8.0/en/performance-schema-examples.html

"Tune the code (this applies to storage engine or server developers only)."

Regards
Takayuki Tsunakawa

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2019-01-07 01:59:56 Re: Implementing Incremental View Maintenance
Previous Message Tomas Vondra 2019-01-07 00:45:20 Re: [HACKERS] PATCH: multivariate histograms and MCV lists