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 1h7JbT-00051t-Pl for pgsql-general@arkaria.postgresql.org; Fri, 22 Mar 2019 12:48:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7JbS-0007ca-GG for pgsql-general@arkaria.postgresql.org; Fri, 22 Mar 2019 12:48:54 +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 1h7Jb9-0003Tt-SW for pgsql-general@lists.postgresql.org; Fri, 22 Mar 2019 12:48:36 +0000 Received: from aart.rice.edu ([168.7.56.48]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7Jb6-0004tT-MW for pgsql-general@lists.postgresql.org; Fri, 22 Mar 2019 12:48:34 +0000 Received: by aart.rice.edu (Postfix, from userid 18612) id 1125D427F283; Fri, 22 Mar 2019 07:48:32 -0500 (CDT) Date: Fri, 22 Mar 2019 07:48:32 -0500 From: Kenneth Marshall To: Francisco Olarte Cc: Thomas =?iso-8859-1?Q?G=FCttler?= , "pgsql-generallists.postgresql.org" , Adrian Klaver , "Peter J. Holzer" , Tom Lane Subject: Re: Script which shows performance of ByteA: ascii vs binary Message-ID: <20190322124832.GA5616@aart.rice.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Mar 22, 2019 at 01:40:28PM +0100, Francisco Olarte wrote: > Thomas: > > On Fri, Mar 22, 2019 at 11:22 AM Thomas Güttler > wrote: > > Thank you for asking several times for a benchmark. > > I wrote it now and it is visible: inserting random bytes into bytea is much slower, > > if you use the psycopg2 defaults. > > Here is the chart: > > https://github.com/guettli/misc/blob/master/bench-bytea-inserts-postrgres.png > > And here is the script which creates the chart: > > https://github.com/guettli/misc/blob/master/bench-bytea-inserts-postrgres.py > > I'm not too sure, but I read ( in the code ) you are measuring a > nearly not compressible urandom data againtst a highly compressible ( > 'x'*i ) data, > are you sure the difference is not due to data being compressed and > generating much less disk usage in toast-tables/wal? > > Francisco Olarte. > +1 Regards, Ken