On Tue, Jan 03, 2023 at 01:52:17PM +0800, Julien Rouhaud wrote: > Resetting the data adds some noticeable overhead as newly added entries will > need to generate a normalize query string and so on. What most people do is > taking regular snapshots of pg_stat_statements (and other stats) view and then > compare the snapshots. There are a few open source projects doing that > available. Why do you assume that the cost of normalization query string will be in any way measurable? Especially in comparison do extra cost of doin math on potentially thousands of rows? Best regards, depesz