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 1h5tQE-0002fU-EI for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:39:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5tQD-0004Y2-4t for pgsql-general@arkaria.postgresql.org; Mon, 18 Mar 2019 14:39:25 +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 1h5tQC-0004Vt-QQ for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:39:24 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tQA-0006xQ-2d for pgsql-general@lists.postgresql.org; Mon, 18 Mar 2019 14:39:24 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1B05B224B3; Mon, 18 Mar 2019 10:39:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 18 Mar 2019 10:39:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=y 5I6KHZLaEj7cSGU4DYv9cbvQ86FgAPl2UUFBxXh+rA=; b=SZIu5GSepzoOWDnOm q6FfTs2oI2EVrxFFCi2D9Djno9/Sh5N0bzkEMN/qjYTbbP4/FdH7b8gdWOIIGNvF 2+xWjgFZxesgnrH8kCpk4nPaAVjmj2an2F+7KuI1uMTgFiZR0lPqQbraIhEPvMdl PHRv/lSgdcXYmcB/nTGUtoS0GgcvTI69k4TnB8oLd7e0aHMLKGeGSq9EWsgoqRjC GpVyI4LzX5nsMTBY75e3F9NlkFR9egMKvExEMxOtHXOSCKEv7+nyCpfP7q1DKDDC bIhk2+UETaWgIJ+g1e/5AVLaT2TQkoz5Z3jUSdyLNfUb54Yn6ECaJbSlWoykb0N7 wmzWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=y5I6KHZLaEj7cSGU4DYv9cbvQ86FgAPl2UUFBxXh+ rA=; b=MDD9I4sfVx4ffQQeF5Xkc+jto3kv5S2wFACeNvHPFVSZfzfHxquj6zRPf S5HIbo7+PMQK7DUK2prCfLWiBV6tfKkImFVAj4K7Ks7vpMnfF730keqoBWi/mWz4 9+AZ+iEsiu4mep335ZjmQgWVkX9GWQsbAG7AGyYSQuUQF3OgSsxmDuckFJ1uk+75 pK6MoDWH6RGBf96/e5b6/LVe45yVgHnLovPiL1RntRRWkuHAamB25JEjzLR8Yy5J bPayR4KErxFUiyQLLBpYTvDqY5aUCvEXG8VlFPouI/xD/vBHg95k2GBzUSg8g1me IsYgxfmhJOib8yb0YUD+QkDfNhoeg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddriedugdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucfkphepjedurddvuddvrdduhedtrddvtd dvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 9CD5AE4240; Mon, 18 Mar 2019 10:39:18 -0400 (EDT) Subject: Re: Performance of ByteA: ascii vs binary To: =?UTF-8?Q?Thomas_G=c3=bcttler?= , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <8002ab5d-64b9-46c9-c2f4-62d03dd18cf3@aklaver.com> Date: Mon, 18 Mar 2019 07:39:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/18/19 7:33 AM, Thomas Güttler wrote: > I did some benchmarking and in my setup there was major > performance difference. > > I tested a ByteA column. What was the test? > > 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 > > -- Adrian Klaver adrian.klaver@aklaver.com