From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-performance@lists.postgresql.org
Subject: Re: Performance
Date: Fri, 23 Feb 2018 22:20:15 +0100
Message-ID: <04a2e637-0d72-d069-c2ee-7cee12eec90a@a-kretschmer.de> (raw)
In-Reply-To: <SN6PR0102MB35033163A20AAFE86921E5989BCC0@SN6PR0102MB3503.prod.exchangelabs.com>
References: <SN6PR0102MB3503919BA19E31222A2E991F9BCC0@SN6PR0102MB3503.prod.exchangelabs.com>
<20180223192638.GM2416@tamriel.snowman.net>
<SN6PR0102MB35033163A20AAFE86921E5989BCC0@SN6PR0102MB3503.prod.exchangelabs.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andreas@a-kretschmer.de, pgsql-performance@lists.postgresql.org
Subject: Re: Performance
In-Reply-To: <04a2e637-0d72-d069-c2ee-7cee12eec90a@a-kretschmer.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox