public inbox for [email protected]  
help / color / mirror / Atom feed
Execution history of a single query
3+ messages / 3 participants
[nested] [flat]

* Execution history of a single query
@ 2024-05-17 16:42  arun chirappurath <[email protected]>
  0 siblings, 2 replies; 3+ messages in thread

From: arun chirappurath @ 2024-05-17 16:42 UTC (permalink / raw)
  To: [email protected]

Hi All,

From pg_stat_statements we can get the overall execution details of queries.

Can we get the execution details of a single queryid ?

Like today it took 6 seconds,yesterday 5 and so on..just for one query.

Thanks,
Arun


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Execution history of a single query
@ 2024-05-17 17:23  Greg Sabino Mullane <[email protected]>
  parent: arun chirappurath <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Greg Sabino Mullane @ 2024-05-17 17:23 UTC (permalink / raw)
  To: arun chirappurath <[email protected]>; +Cc: [email protected]

Not directly through pg_stat_statements, no. But you can:

* Use log_min_duration_statement to spy on individual runs
* Periodically copy pg_stat_statements to another table, reset the stats,
and then you have some time-based buckets to play with.

Cheers,
Greg


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Execution history of a single query
@ 2024-05-17 23:05  Julien Rouhaud <[email protected]>
  parent: arun chirappurath <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Julien Rouhaud @ 2024-05-17 23:05 UTC (permalink / raw)
  To: arun chirappurath <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>

On Sat, 18 May 2024, 00:42 arun chirappurath, <[email protected]> wrote:

> Hi All,
>
> From pg_stat_statements we can get the overall execution details of
> queries.
>
> Can we get the execution details of a single queryid ?
>
> Like today it took 6 seconds,yesterday 5 and so on..just for one query.
>

you can use PoWA for that: https://powa.readthedocs.io/en/latest/

>


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-05-17 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 16:42 Execution history of a single query arun chirappurath <[email protected]>
2024-05-17 17:23 ` Greg Sabino Mullane <[email protected]>
2024-05-17 23:05 ` Julien Rouhaud <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox