On Mon, Jan 29, 2018 at 9:52 PM, Nikolay Samokhvalov
wrote:
>
>
> On Mon, Jan 29, 2018 at 3:45 PM, Jan De Moerloose
> wrote:
>
>> So the query is just the latest query and the time is the transaction
>> time since this query, i suppose ?
>> Thanks for your answer, i will try to make the transact
On Mon, Jan 29, 2018 at 3:45 PM, Jan De Moerloose wrote:
> So the query is just the latest query and the time is the transaction time
> since this query, i suppose ?
> Thanks for your answer, i will try to make the transaction shorter as you
> suggest.
>
Yep. This is a very common confusion, how
So the query is just the latest query and the time is the transaction time
since this query, i suppose ?
Thanks for your answer, i will try to make the transaction shorter as you
suggest.
On Tue, Jan 30, 2018 at 12:29 AM, Nikolay Samokhvalov wrote:
> On Mon, Jan 29, 2018 at 3:19 PM, Jan De Moerl
On Mon, Jan 29, 2018 at 3:19 PM, Jan De Moerloose wrote:
> The state is 'idle in transaction'.
>
So you have long-running *transactions*, not queries. This is not good for
an OLTP system, because some transaction can wait of others, which are
"idle in transaction" but do nothing at the moment. T
The state is 'idle in transaction'.
On Tue, Jan 30, 2018 at 12:10 AM, Nikolay Samokhvalov wrote:
> On Mon, Jan 29, 2018 at 3:06 PM, Jan De Moerloose
> wrote:
> ...
>
>> SELECT pid, age(clock_timestamp(),query_start) as age, usename, query,
>> state from pg_stat_activity order by age;
>>
>> When
On 01/29/2018 03:06 PM, Jan De Moerloose wrote:
Hi,
I'm using the following to detect long running queries in a webapp that
is high on cpu:
SELECT pid, age(clock_timestamp(),query_start) as age, usename, query,
state from pg_stat_activity order by age;
I would add WHERE state = 'active'
On Mon, Jan 29, 2018 at 3:06 PM, Jan De Moerloose wrote:
...
> SELECT pid, age(clock_timestamp(),query_start) as age, usename, query,
> state from pg_stat_activity order by age;
>
> When the cpu is 100% and the app slowing down, i can see that some queries
> have a long age.
>
What is the value
Hi,
I'm using the following to detect long running queries in a webapp that is
high on cpu:
SELECT pid, age(clock_timestamp(),query_start) as age, usename, query,
state from pg_stat_activity order by age;
When the cpu is 100% and the app slowing down, i can see that some queries
have a long age.