From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Thomas Güttler <guettliml(at)thomas-guettler(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Script which shows performance of ByteA: ascii vs binary |
Date: | 2019-03-22 14:48:36 |
Message-ID: | 0498449a-8b8c-3c1a-19e8-2e43095b9d80@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 3/22/19 6:04 AM, Thomas Güttler wrote:
>
>
> Am 22.03.19 um 13:40 schrieb Francisco Olarte:
>> Thomas:
>>
>> On Fri, Mar 22, 2019 at 11:22 AM Thomas Güttler
>> <guettliml(at)thomas-guettler(dot)de> wrote:
>>> Thank you for asking several times for a benchmark.
>>> I wrote it now and it is visible: inserting random bytes into bytea
>>> is much slower,
>>> if you use the psycopg2 defaults.
>>> Here is the chart:
>>>
>>> https://github.com/guettli/misc/blob/master/bench-bytea-inserts-postrgres.png
>>>
>>> And here is the script which creates the chart:
>>>
>>> https://github.com/guettli/misc/blob/master/bench-bytea-inserts-postrgres.py
>>>
>>
>> I'm not too sure, but I read ( in the code ) you are measuring a
>> nearly not compressible urandom data againtst a highly compressible (
>> 'x'*i ) data,
>> are you sure the difference is not due to data being compressed and
>> generating much less disk usage in toast-tables/wal?
>
> +1
>
> for this case toast-tables/wal is a detail of the implementation.
> This tests does not care about the "why it takes longer". It just generates
> a performance chart.
TOAST is tunable, might want to take a look at:
https://www.postgresql.org/docs/11/storage-toast.html
>
> Yes, it does exactly what you say: it compares
> nearly not compressible urandom data against a highly compressible data.
>
> In my case, will get nearly random data (binary PDF, JPG, ...). And
> that's why
> I wanted to benchmark it.
>
> Regards,
> Thomas
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2019-03-22 14:56:58 | Re: How to check is connection encrypted |
Previous Message | Tony Shelver | 2019-03-22 14:33:44 | Re: Forks of pgadmin3? |