Re: Regarding postgreSQL performance on DRAM - Mailing list pgsql-admin

From Tom Lane
Subject Re: Regarding postgreSQL performance on DRAM
Date
Msg-id 29251.1550696663@sss.pgh.pa.us
Whole thread Raw
In response to Re: Regarding postgreSQL performance on DRAM  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Regarding postgreSQL performance on DRAM  (Thomas Kellerer <spam_eater@gmx.net>)
Re: Regarding postgreSQL performance on DRAM  (Rohan Kadekodi <kadekodirohan@gmail.com>)
Precompressed data in TOASTed columns (was Re: Regarding postgreSQLperformance on DRAM)  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-admin
Thomas Kellerer <spam_eater@gmx.net> 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 tuple (row)?
> As each column is substantially shorter than the TOAST threshold, I would 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.

From 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


pgsql-admin by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Regarding postgreSQL performance on DRAM
Next
From: Thomas Kellerer
Date:
Subject: Re: Regarding postgreSQL performance on DRAM