Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aDlV1-0006FT-HE for pgsql-admin@arkaria.postgresql.org; Tue, 29 Dec 2015 04:03:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aDlV0-0001Yg-8D for pgsql-admin@arkaria.postgresql.org; Tue, 29 Dec 2015 04:03:02 +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.84) (envelope-from ) id 1aDlTJ-00089G-Cf for pgsql-admin@postgresql.org; Tue, 29 Dec 2015 04:01:17 +0000 Received: from mail-by2on0091.outbound.protection.outlook.com ([207.46.100.91] helo=na01-by2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aDlT9-00030R-Ei for pgsql-admin@postgresql.org; Tue, 29 Dec 2015 04:01:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=journyx.onmicrosoft.com; s=selector1-journyx-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1DnhphsJOHqfsPu9PJvlnznvMglHMC93QjzUwjwq9UU=; b=ZZlXfxvvi7Pz9ZE/3omhv9ocS+VZxqp4w2S/Q1jV2tQhB9v9oYiWHH0Fc89cHcrS7NXYD3D/UYav64jqPF6sPdhb8JFh6+2LXUp9wKmZgT7Zic6gRKFL3ovAsz0xjNW0chB4rVBCxYl/+EB7PTDoJFDLMVgxDDcYt6XQfpwlCQY= Received: from BY1PR11MB0390.namprd11.prod.outlook.com (10.162.146.14) by BY1PR11MB0390.namprd11.prod.outlook.com (10.162.146.14) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 29 Dec 2015 04:01:03 +0000 Received: from BY1PR11MB0390.namprd11.prod.outlook.com ([10.162.146.14]) by BY1PR11MB0390.namprd11.prod.outlook.com ([10.162.146.14]) with mapi id 15.01.0361.006; Tue, 29 Dec 2015 04:01:03 +0000 From: Scott Whitney To: Nik Tek , Matheus de Oliveira CC: "pgsql-admin@postgresql.org" Subject: Re: log_statement vs Statistics Collector (pg_stat_database,, etc) Thread-Topic: [ADMIN] log_statement vs Statistics Collector (pg_stat_database,, etc) Thread-Index: AQHRPpLM7+nmml1EWkCuJyhamUd3BZ7e2dwAgAJBrACAAEJjLA== Date: Tue, 29 Dec 2015 04:01:02 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=scott@journyx.com; x-originating-ip: [68.203.26.241] x-microsoft-exchange-diagnostics: 1; BY1PR11MB0390; 5:a+LpBcLuZq7Uqv/W/Ar6oiDiRjY/980AhX9qu5nliDeJastRm7nbJfP8IU3ssyk1crY3bljVT4DBwyjd8iAl1dLcaVZkuWyrA8OJ/r4ZLl7zz185ZKDm8U4Uq39NJoGaFYFDk8AUlrUEl1dmP8u7sQ==; 24:ymREZXhHgUbWwDIkcXTXPc+Lzu74WFtoztg3HNWb7q4Dfbwpf/XlASJaFbbLsYOUOU/iZdrAP1jZRol9Qi8E1frqXsCxaQOwWI4M9GlZWqw= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0390; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(106590470423099); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:BY1PR11MB0390; BCL:0; PCL:0; RULEID:; SRVR:BY1PR11MB0390; x-forefront-prvs: 0805EC9467 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(479174004)(24454002)(199003)(377454003)(189002)(97736004)(5008740100001)(92566002)(11100500001)(101416001)(19580395003)(5004730100002)(10400500002)(19273905006)(40100003)(95246002)(5001960100002)(81156007)(19580405001)(15974865002)(16297215004)(54356999)(1220700001)(122556002)(1096002)(5001770100001)(189998001)(19300405004)(16236675004)(87936001)(586003)(5002640100001)(106356001)(106116001)(50986999)(76176999)(105586002)(99286002)(86362001)(3846002)(19617315012)(63666004)(2900100001)(33646002)(2950100001)(15975445007)(66066001)(77096005)(102836003)(6116002)(562404015)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR11MB0390; H:BY1PR11MB0390.namprd11.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: journyx.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_b0v8bp22049ykj7xql697jud1451361647658emailandroidcom_" MIME-Version: 1.0 X-OriginatorOrg: journyx.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Dec 2015 04:01:02.8291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83db917a-cb55-44ba-82ef-25aa3e32343f X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB0390 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --_000_b0v8bp22049ykj7xql697jud1451361647658emailandroidcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am sorry. I am late to this thread. Please do not think there is zero imp= act. -------- Original message -------- From: Nik Tek Date: 12/28/2015 6:05 PM (GMT-06:00) To: Matheus de Oliveira Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] log_statement vs Statistics Collector (pg_stat_databas= e,, etc) Thank you Matheus! Based on the study, there's very little performance impact when enabling lo= g_min_duration_statement, right? Thank you Nik On Sun, Dec 27, 2015 at 5:35 AM, Matheus de Oliveira > wrote: On Thu, Dec 24, 2015 at 7:32 PM, Nik Tek > wrote: I wanted to capture all the DML statements executed in the database informa= tion (execution time, ). Question: Can anyone point me pros and cons on either of the approaches. In my testing, I haven't found any performance degrade on application opera= tions when enabled the additional logging (below logging). Besides log_min_duration_statement, you can use tools like pg_stat_statemen= ts [1] and POWA [2]. POWA authors even did a comparison of performance impa= ct of having log_min_duration_statement (to latter process with pgBadger), = using POWA extension and nothing, see [3]. [1] http://www.postgresql.org/docs/current/static/pgstatstatements.html [2] http://dalibo.github.io/powa/ [3] https://github.com/dalibo/powa/wiki/POWA-vs-pgBadger -- Matheus de Oliveira -- Thank you NikTeki Journyx, Inc. 7600 Burnet Road #300 Austin, TX 78757 www.journyx.com p 512.834.8888 f 512-834-8858 Do you receive our promotional emails? You can subscribe or unsubscribe to = those emails at http://go.journyx.com/emailPreference/e/4932/714/ --_000_b0v8bp22049ykj7xql697jud1451361647658emailandroidcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am sorry. I am late to this thread. Please do not think there is zero imp= act.

-------- Original message --------
From: Nik Tek <niktek2005@gmail.com>
Date: 12/28/2015 6:05 PM (GMT-06:00)
To: Matheus de Oliveira <matioli.matheus@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] log_statement vs Statistics Collector (pg_stat_databas= e,, etc)

Thank you Matheus!

Based on the study, there's very little performance impact when enabli= ng log_min_duration_statement, right?=

Thank you
Nik

On Sun, Dec 27, 2015 at 5:35 AM, Matheus de Oliv= eira <matioli.= matheus@gmail.com> wrote:

On Thu, Dec 24, 2015 at 7:32 PM, Nik Tek <niktek2005@gm= ail.com> wrote:
I wanted to capture all the DML statements executed in the database in= formation (execution time, ).

Question:
Can anyone point me pros and cons on either of the approaches.

In my testing, I haven't found any performance degrade on application = operations when enabled the additional logging (below logging).

Besides log_min_duration_statement, you can use = tools like pg_stat_statements [1] and POWA [2]. POWA authors even did a com= parison of performance impact of having log_min_duration_statement (to latt= er process with pgBadger), using POWA extension and nothing, see [3].

[1] http://www.postgresql.org/docs/current/static/pgstatstatements.html
[2] http://dali= bo.github.io/powa/
[3] https://github.com/dalibo/powa/wiki/POWA-vs-pgBadger


--
Matheus de Oliveira





--
Thank you
NikTeki


Journyx, Inc.
7600 Burnet Road #300
Austin, TX 78757
www.journyx.com

p 512.834.8888 
f 512-834-8858 

Do you receive our promotional emails? You can subscribe or unsubscrib= e to those emails at http://go.journyx.com/emailPreference/e/4932/714/ = ;
--_000_b0v8bp22049ykj7xql697jud1451361647658emailandroidcom_--