pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G. Johnston <david.g.johnston@gmail.com>
To: Estevan Rech <softrech@gmail.com>
Cc: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Best Strategy for Large Number of Images
Date: Wed, 15 Dec 2021 10:59:53 -0700
Message-ID: <CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.gmail.com> (raw)
In-Reply-To: <CAJZXSXi=6oXmcWiDdEFAud2g8q1UT8gk+=Ru=y-yMXaEGL+-yQ@mail.gmail.com>
References: <CAJZXSXjNC7jf5Z0fdWW09NupOG3KcvX7hDK-abNLcnOj6vwMgQ@mail.gmail.com>
	<ae420001-09c8-a2b5-1dc6-c7af3322893e@gmail.com>
	<CAJZXSXi=6oXmcWiDdEFAud2g8q1UT8gk+=Ru=y-yMXaEGL+-yQ@mail.gmail.com>

On Wed, Dec 15, 2021 at 10:57 AM Estevan Rech <softrech@gmail.com> wrote:

> 350kb
>
> Em qua., 15 de dez. de 2021 às 14:50, Rob Sargent <robjsargent@gmail.com>
> escreveu:
>
>> On 12/15/21 10:45, Estevan Rech wrote:
>>
>> Hi,
>>
>> I don't currently use PostgreSQL, but I plan to migrate and I have a
>> question about the best way/strategy for storing images. I have about 2
>> million images with a growth trend of around 1 million images per year. I
>> plan to store in bytea format in an isolated table. Is this recommended? Is
>> there another better way?
>>
>> How big are the images on average?
>>
>
Please don't top-post - inline or bottom posting (with trimming) is the
custom here.

It does depend (both on the size and usage patterns).

An alternative way is to simply not store images within the database
itself.  Store a pointer, and then store the image externally.  The
application then gets the pointer from the database and uses it to retrieve
the image from the image server.

David J.

view thread (25+ messages)  latest in thread

Message-ID: <CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.gmail.com>
Permalink:  ../CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.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: david.g.johnston@gmail.com, softrech@gmail.com, robjsargent@gmail.com
  Subject: Re: Best Strategy for Large Number of Images
  In-Reply-To: <CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.gmail.com>
  References: <CAJZXSXjNC7jf5Z0fdWW09NupOG3KcvX7hDK-abNLcnOj6vwMgQ@mail.gmail.com> <ae420001-09c8-a2b5-1dc6-c7af3322893e@gmail.com> <CAJZXSXi=6oXmcWiDdEFAud2g8q1UT8gk+=Ru=y-yMXaEGL+-yQ@mail.gmail.com> <CAKFQuwYFtsb8uS1dEutYsr5FtnPYTb72eySCBqqQUC5git9WSQ@mail.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