Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLQWJ-0004oL-Q6 for pgsql-general@arkaria.postgresql.org; Wed, 23 May 2018 09:57:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fLQWI-0007XD-NR for pgsql-general@arkaria.postgresql.org; Wed, 23 May 2018 09:57:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLQWI-0007X3-Bh for pgsql-general@lists.postgresql.org; Wed, 23 May 2018 09:57:22 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fLQWD-00054Z-Tp for pgsql-general@postgresql.org; Wed, 23 May 2018 09:57:20 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 64669D172BD6 for ; Wed, 23 May 2018 02:57:16 -0700 (MST) Date: Wed, 23 May 2018 02:57:16 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1527069436408-0.post@n3.nabble.com> In-Reply-To: <1021506835.4000295.1526993909313@mail.yahoo.com> References: <1021506835.4000295.1526993909313@mail.yahoo.com> Subject: Re: Help in Postgresql MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Moohanad, Did you check for pg_stat_statements https://www.postgresql.org/docs/10/static/pgstatstatements.html ? This is based on postgres hooks and will give you: db,user,query id, query text There are many developments trying to add start /end time, planid, plan text as described in http://www.postgresql-archive.org/Poc-pg-stat-statements-with-planid-td6014027.html remark: this extension doen't care about statements finished in error or timeout Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html