Re: sql execution time in pg_stat_statements

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michel SALAIS <msalais(at)msym(dot)fr>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: sql execution time in pg_stat_statements
Date: 2021-09-10 17:43:06
Message-ID: CAOBaU_Z=+-SeHeG4wBOLUEAYs+ngrtFYUTUyE0RATLZ-RJ=AjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, Sep 11, 2021 at 1:12 AM Michel SALAIS <msalais(at)msym(dot)fr> wrote:
>
> I thaught that total_time (total_exec_time + total_plan_time) included I/O but when we have blk_read_time + blk_write_time equals several times total_time it is difficult to continue to think that...

Maybe not that difficult. If the queries use parallelism, the query
total execution time may be say 1 second, but if there were X workers
it could actually cumulate X+1 seconds of execution time, and
therefore reach more than 1 second of cumulated read/write time.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kristjan Mustkivi 2021-09-13 13:24:57 Postgres chooses slow query plan from time to time
Previous Message Tom Lane 2021-09-10 17:42:08 Re: sql execution time in pg_stat_statements