Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5taL-0003Bq-4l for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:49:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5taJ-0001E9-QW for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:49:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5taJ-0001E2-EE for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:49:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5taH-0007g6-1Z for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:49:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2IEnjl2002889; Mon, 18 Mar 2019 10:49:45 -0400 From: Tom Lane To: Adrian Klaver cc: =?UTF-8?Q?Thomas_G=c3=bcttler?= , pgsql-general@lists.postgresql.org Subject: Re: Performance of ByteA: ascii vs binary In-reply-to: <8002ab5d-64b9-46c9-c2f4-62d03dd18cf3@aklaver.com> References: <8002ab5d-64b9-46c9-c2f4-62d03dd18cf3@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Mon, 18 Mar 2019 07:39:17 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2884.1552920585.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 18 Mar 2019 10:49:45 -0400 Message-ID: <2888.1552920585@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 3/18/19 7:33 AM, Thomas Güttler wrote: >> If I used ascii data the tests took 52 seconds. >> If I used random binary data the test took 250 seconds. This doesn't seem terribly surprising in bytea_output = escape mode. Probably with bytea_output = hex the performance would be less data-dependent. regards, tom lane