pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Use bytearray for blobs or not?
Date: Fri, 4 Jan 2019 09:02:34 -0700
Message-ID: <d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com> (raw)
In-Reply-To: <07d16f3f-0352-7802-ef1c-bd9987ec623b@matrix.gatewaynet.com>
References: <f68a818c-7d7a-d73c-16b0-726dfe2e2e55@thomas-guettler.de>
	<07d16f3f-0352-7802-ef1c-bd9987ec623b@matrix.gatewaynet.com>


On 1/4/19 4:48 AM, Achilleas Mantzios wrote:
> On 4/1/19 1:41 μ.μ., Thomas Güttler wrote:
>> Some months ago I wrote a little application with Python+Django which 
>> stores
>> blob data in bytearrays.
>>
>> It works.
>>
>> In the future there will be a lot more traffic, and I am unsure
>> if this is really a good solution. I know this is more FUD than
>> concrete PG issue.
>>
>> What do you think?
>
> Performance (at least for JDBC) is known to be better with blobs.

Do you have any details on which part is slower with bytea? Original 
insert, read back to client, general (p)sql access.  I'm moving towards 
bytea but still have time to change my mind if I cannot afford the 
performance hit.

> However, with bytea life is just easier for many reasons (backups, 
> logical replication, other types of replication, sys management, etc).
Yes, and in my case I even get a cheap compression from the original file.
>
>>
>> Which alternatives could be useful?
>>
>> Regards,
>>   Thomas
>>
>>
>>
>>
>
>




view thread (6+ messages)  latest in thread

Message-ID: <d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com>
Permalink:  ../d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com/
Also on:    postgresql.org/message-id/d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: Use bytearray for blobs or not?
  In-Reply-To: <d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com>
  References: <f68a818c-7d7a-d73c-16b0-726dfe2e2e55@thomas-guettler.de> <07d16f3f-0352-7802-ef1c-bd9987ec623b@matrix.gatewaynet.com> <d00fdb47-42ae-eb3d-91ac-a4b722920cb4@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox