pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Güttler <guettliml@thomas-guettler.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Performance of ByteA: ascii vs binary
Date: Wed, 20 Mar 2019 13:20:57 +0100
Message-ID: <8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.de> (raw)
In-Reply-To: <20190319193727.34fgmdiipcxdgvn4@hjp.at>
References: <c861b16d-29cb-47ee-6c22-e15f608928b6@thomas-guettler.de>
	<20190319193727.34fgmdiipcxdgvn4@hjp.at>



Am 19.03.19 um 20:37 schrieb Peter J. Holzer:
> On 2019-03-18 15:33:17 +0100, Thomas Güttler wrote:
>> I did some benchmarking and in my setup there was major
>> performance difference.
>>
>> I tested a ByteA column.
>>
>> If I used ascii data the tests took 52 seconds.
>> If I used random binary data the test took 250 seconds.
>>
>> binary data is (roughly) five times slower than ascii data?
>>
>> Is this a know fact, or is there something wrong with my benchmark?
>>
>> I used Python and psycopg2.
> 
> I don't see this here (Debian 9, Python 3,5, psycopg2 2.7.6, PostgreSQL
> 9.5).
> 
> I modified my bench-bytea script (https://github.com/hjp/blob-bench) to
> restrict the byte values to printable ASCII (32 .. 126). There was
> absolutely no difference, as the attached graph shows.

Strange. I saw a big difference.
What did you test?
I tested inserts.

Regards,
   Thomas Güttler



-- 
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines




view thread (9+ messages)  latest in thread

Message-ID: <8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.de>
Permalink:  ../8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.de/
Also on:    postgresql.org/message-id/8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.de

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: guettliml@thomas-guettler.de
  Subject: Re: Performance of ByteA: ascii vs binary
  In-Reply-To: <8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.de>
  References: <c861b16d-29cb-47ee-6c22-e15f608928b6@thomas-guettler.de> <20190319193727.34fgmdiipcxdgvn4@hjp.at> <8edaa4a7-954d-61ad-9641-650ec5d7d643@thomas-guettler.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