Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxYZe-0003vw-8m for pgsql-general@arkaria.postgresql.org; Wed, 15 Dec 2021 18:00:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxYZd-0000pN-4s for pgsql-general@arkaria.postgresql.org; Wed, 15 Dec 2021 18:00:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxYZc-0000pE-R8 for pgsql-general@lists.postgresql.org; Wed, 15 Dec 2021 18:00:16 +0000 Received: from mail-vk1-xa36.google.com ([2607:f8b0:4864:20::a36]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxYZW-0003cX-9m for pgsql-general@lists.postgresql.org; Wed, 15 Dec 2021 18:00:15 +0000 Received: by mail-vk1-xa36.google.com with SMTP id f7so15177480vkf.10 for ; Wed, 15 Dec 2021 10:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xkwb/NmT+LOCs7ed8wFLqzW7BCX6S7pyFMopT0yBswA=; b=FxpaO6eP6zMBVyGzZksNDtQgW8c0+sdDkajcnjFG6jUJ7HCrWvJFf5x8rtqe8E8ozi uYnGtMLZSvjFs+4nDN7B/i+2Tlx0w/4KpPGl8DrUeNtGhhvpUkireeL09/QdF8U3HDP5 MF08GKS9a6X9RxbpPMGzZXgKbV4VvX/r99upZD+BJ0L7QrcbxlGt+qSzmBnNXGsh1ScR 5F5W4FW4KQw+LpepZn62GJiTnhsbasQEH46++VWJo3cbFcNyJ9C2TNDrZ451ZgFrSub4 95nC+KSvdTnBXDt4Zssq2sR807uWD6VAM5wOObJ4ckljNRuUT9PTF7evF50L85aj7NNr DbWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xkwb/NmT+LOCs7ed8wFLqzW7BCX6S7pyFMopT0yBswA=; b=NlCiNGfgN57xe6IVyZlWeUC1TIFf7TOI2DnD5dPJSGN+RDF2rfh/BeXsBE25k465hg tvU2BaUqM40Fn1x3jnKKtwRrbU4RarDtwQ7SBfRfFunqpNdpcm7SX84+sB+PhKmtdhxW LTRZTZ5v3TT4j7yfJOPc9fUUy1UUaOjfP1z5ZlcJbDB0Hy50NUxr4nHiUBBVChOdXxjk EHN3CRm6cebdo731/piCzp1bVHOoyZzQI8RLBfJJZ92kQz1RX3NgOdDhYOirYkdwMm7C 1uIBzA5dga7GuzfuXQrDLppsloiX4Y38eSmhSTyLPV3i55ZNjnrYJumDTPJEWmlCXzvf mabw== X-Gm-Message-State: AOAM531+zh6Jd7tQBKyUrk9E7tlZ19EzrBKFe5tVWfcHRGJZ7c3kuQCj Fz2b7g25MPuIhhAMD2rw8V4xtLqvfA7KsrgWHzLwEvE2X5w= X-Google-Smtp-Source: ABdhPJypj1SFsiUyabI9FZ2bb5FbpNGEay9OSPwS4GqSYyqxw8pVMPrnvRRQY9t38SLk7qeY3c1gXIX319a28MVNCvc= X-Received: by 2002:ac5:c0cc:: with SMTP id b12mr4186390vkk.41.1639591208679; Wed, 15 Dec 2021 10:00:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Wed, 15 Dec 2021 10:59:53 -0700 Message-ID: Subject: Re: Best Strategy for Large Number of Images To: Estevan Rech Cc: Rob Sargent , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000091fe0005d33313e2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000091fe0005d33313e2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 15, 2021 at 10:57 AM Estevan Rech wrote: > 350kb > > Em qua., 15 de dez. de 2021 =C3=A0s 14:50, Rob Sargent > 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. --00000000000091fe0005d33313e2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Dec 15, 2021 at 10:57 AM= Estevan Rech <softrech@gmail.com<= /a>> wrote:
<= div dir=3D"ltr">
350kb

=20 =20 =20
On 12/15/21 10:45, Estevan Rech wrote:
=20
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 trimm= ing) is the custom here.

It does depend (both on the s= ize and usage patterns).

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

Da= vid J.
--00000000000091fe0005d33313e2--