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 1olShH-0002on-8S for pgsql-general@arkaria.postgresql.org; Thu, 20 Oct 2022 10:22:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1olSgF-0002v9-HH for pgsql-general@arkaria.postgresql.org; Thu, 20 Oct 2022 10:21:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olSgF-0002uz-6H for pgsql-general@lists.postgresql.org; Thu, 20 Oct 2022 10:21:39 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1olSg9-0001dM-0H for pgsql-general@lists.postgresql.org; Thu, 20 Oct 2022 10:21:38 +0000 Received: by mail-wm1-x333.google.com with SMTP id y10so14613731wma.0 for ; Thu, 20 Oct 2022 03:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=zDPgGi5mWsGt0L+JrWSMyuuWafpucOSE2+aVHthIKdg=; b=uWkVsvIJa15TeA4t+6+wO+hFoUDgxnms12bLHrHLOK4e061KdUODLMBu5cjdqjmfSS +EMqChqHY4jUDZvcwGtpKGo/QIAt7ZUja+MQL8zS6BeC1/eSVM4Gx9N2nG/rNfMBFI/F pQATVPV71Jn5Q+mThCQKO7/+fPOpfSVXE6kxRO0dzx09OM2YyJTQ5L5d//lmQVPlYDWd LzDHsoHA6z+l99H0feXLtILAZbdq3krG7uNbrAUqNxPbd66tx1yfH3Ml0SInL4qb+Yd5 vw1Z4j2dA/NlLrgPAAb0CjXqrp4p7WvUZNtWNBITNWLwTdi4WqigrSeWfKjkE0c3a6bo Xwzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zDPgGi5mWsGt0L+JrWSMyuuWafpucOSE2+aVHthIKdg=; b=ucuhepAXL+MA3eZktZgsS9crV1RSulBROAIo2DRuyHRdPI/NEtbYEPpR1L/dvs0glx rI8hv5gD8M/BIp/J9EWbwFUxoTJHm3l2gzKXAdVxNwSlp5+WVkm3qumQX0M7RaafYDLk K/pFx1otAeGE8KLfAznjztrdaNyD4wT5O2ZEL2Jq4R7TJP7kIDG6v/Hh3DUvDO8z7+Kd 46TLwRISFyjpDE006tJkD3npjJHKgc6Y/feWuQekz/CabGELQISYHzvvBYuxfCaJvvIl ScsG8FrK010944eS1fd62vakd2VckZmGAKBMlHgrxpNEbnFGpbHLSFcqfnRlLzgfSRes 4Z6A== X-Gm-Message-State: ACrzQf1D7dcyvJFuyiSyfz7VXoOvOFU0XztbX7vZimdWOne5IeQoKWW9 SLsiJEw3G6opkpFQZFIIjBzVyg== X-Google-Smtp-Source: AMsMyM4cNmQoXuiVupxRktj4cwpBgijEWgDObHn41g/F8sXJ+XJoH0uzxtvWdebWwSOr7xvvSnQktQ== X-Received: by 2002:a1c:f20e:0:b0:3c2:5062:4017 with SMTP id s14-20020a1cf20e000000b003c250624017mr28858007wmc.175.1666261290629; Thu, 20 Oct 2022 03:21:30 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:1bf6:de54:3462:940f:7897]) by smtp.gmail.com with ESMTPSA id x6-20020a5d54c6000000b0022e2c38f8basm15788563wrv.14.2022.10.20.03.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 03:21:30 -0700 (PDT) Message-ID: <8dad27efeb4d05898d8f3a28838f64d8cb0f64be.camel@cybertec.at> Subject: Re: How to store "blobs" efficiently for small and large sizes, with random access From: Laurenz Albe To: Dominique Devienne Cc: Andreas Joseph Krogh , pgsql-general@lists.postgresql.org Date: Thu, 20 Oct 2022 12:21:29 +0200 In-Reply-To: References: <68063d68a94af2be2dd42b29f8fff956360270e9.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2022-10-20 at 10:32 +0200, Dominique Devienne wrote: > But before I finish this thread for now, I'd like to add that I > consider unfortunate a state of affairs where > NOT putting the data in the DB is the mostly agreed upon advice. It > IMHO points to a weak point of > PostgreSQL, which does not invest in those use-cases with large data, > perhaps with more file-system > like techniques. Relational databases are general-purpose software, but that doesn't mean that they are the right tool for everything. And storing large files is not what they are good at. File systems are the right tool here. > FWIW, when Oracle introduced SecureFile blobs years ago in v11, it > represented a leap forward in > performance, and back then we were seeing them being 3x faster than LO > at GB sizes, if I recall correctly, I don't know what exactly they are, but I suspect that they are just files (segments?) in Oracle's "file system" (tablespaces/datafiles). So pretty much what we recommend. Yours, Laurenz Albe