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 1h5tIx-0002Ld-S2 for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:31:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5tIw-0005mC-Dy for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:31:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tIw-0005if-3I for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:31:54 +0000 Received: from hz1.yz.to ([178.63.61.147]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tIt-0006kJ-6Q for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:31:53 +0000 Received: from [172.17.6.34] (mail.tbz-pariv.de [146.0.121.193]) by hz1.yz.to (Postfix) with ESMTPSA id 006CC8480B76; Mon, 18 Mar 2019 15:31:49 +0100 (CET) To: pgsql-general@lists.postgresql.org From: =?UTF-8?Q?Thomas_G=c3=bcttler?= Subject: Performance of ByteA: ascii vs binary Message-ID: Date: Mon, 18 Mar 2019 15:33:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. Regards, Thomas Güttler -- Thomas Guettler http://www.thomas-guettler.de/ I am looking for feedback: https://github.com/guettli/programming-guidelines