On 10/8/21 11:21, Bruce Momjian wrote:
> Ah, this is exactly what I wanted to know --- what people are using the
> event waits for. Can you tell if these are done all externally, or if
> they need internal database changes?
Well, the methodology goes like this: we get the slow queries from
pgBadger report and then run explain (analyze, timing, buffers) on the
query. If we still cannot figure out how to improve things, we check the
events and see what the query is waiting for. After that we may add an
index, partition the table, change index structure or do something like
that. Unrelated to this discussion, I discovered Bloom extension. Bloom
indexes are phenomenally useful. I apologize for the digression.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com