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 1gwZ2f-0002nq-BI for pgsql-admin@arkaria.postgresql.org; Wed, 20 Feb 2019 21:04:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwZ2d-0008P9-Q2 for pgsql-admin@arkaria.postgresql.org; Wed, 20 Feb 2019 21:04:31 +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 1gwZ2d-0008Mh-Gs for pgsql-admin@lists.postgresql.org; Wed, 20 Feb 2019 21:04:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwZ2b-0001RY-0E for pgsql-admin@lists.postgresql.org; Wed, 20 Feb 2019 21:04:31 +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 x1KL4NAO029252; Wed, 20 Feb 2019 16:04:23 -0500 From: Tom Lane To: Thomas Kellerer cc: pgsql-admin@lists.postgresql.org Subject: Re: Regarding postgreSQL performance on DRAM In-reply-to: References: <87va1exlfo.fsf@jsievers.enova.com> Comments: In-reply-to Thomas Kellerer message dated "Wed, 20 Feb 2019 21:42:22 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29250.1550696663.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Feb 2019 16:04:23 -0500 Message-ID: <29251.1550696663@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer writes: > Jerry Sievers schrieb am 20.02.2019 um 21:19: >>> My workload is simple. I insert 1 million rows into a table with 100 >>> columns, where each column is 256 bytes in length, and every 10 >>> inserts are batched into a transaction. >> Your test workload qualifies for TOASTing due to the $unrealistically >> long physical tuple size. > Hmm. I though TOAST is only applied to single values, not the entire tup= le (row)? > As each column is substantially shorter than the TOAST threshold, I woul= d not expect toasting to kick in here. Well, the entire tuple would be 25600 bytes plus some overhead, which cannot fit on a Postgres page (8K, unless the OP changed compile options without mentioning it). So something has to be done to make it fit, and that something is going to be toasting any fields that can be toasted. =46rom memory, our threshold for trying to make tuples narrower is only a quarter-page anyway, so that the toaster will be trying to get this down to 2K if it can. That's certainly going to involve compressing every field, and I wouldn't be surprised if a lot of them get shoved out-of-line too. The OP might care to read https://www.postgresql.org/docs/current/storage-toast.html regards, tom lane