Re: Execution history of a single query

2024-05-17 Thread Julien Rouhaud
On Sat, 18 May 2024, 00:42 arun chirappurath,  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/

>


Re: Execution history of a single query

2024-05-17 Thread Greg Sabino Mullane
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


Execution history of a single query

2024-05-17 Thread arun chirappurath
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