Re: Performance - Mailing list pgsql-performance

From Andreas Kretschmer
Subject Re: Performance
Date
Msg-id 04a2e637-0d72-d069-c2ee-7cee12eec90a@a-kretschmer.de
Whole thread Raw
In response to Performance  (Daulat Ram <Daulat.Ram@exponential.com>)
Responses Re: Performance  (phb07 <phb07@apra.asso.fr>)
List pgsql-performance

Am 23.02.2018 um 20:29 schrieb Daulat Ram:
>   We have the following requirements in single query or any proper solution. Please help on this.
> How many sessions are currently opened.
ask pg_stat_activity, via select * from pg_stat_activity


>   -and if opened then how many queries have executed on that session.

Whot? There isn't a counter for that, AFAIK.


>   -and also we have to trace how much time each query is taking.

You can use auto_explain for that

>   -and also we have to find the cost of each query.

the same, auto_explain

please keep in mind: costs are imaginary.



Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



pgsql-performance by date:

Previous
From: Daulat Ram
Date:
Subject: Please help
Next
From: Andreas Kretschmer
Date:
Subject: Re: Please help