X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B343A8B9D77 for ; Tue, 1 Feb 2005 02:26:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87687-01 for ; Tue, 1 Feb 2005 02:26:31 +0000 (GMT) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by svr1.postgresql.org (Postfix) with ESMTP id 70FF98B9D0F for ; Tue, 1 Feb 2005 02:26:31 +0000 (GMT) Received: from web1.messagingengine.com (web1.internal [10.202.2.210]) by frontend1.messagingengine.com (Postfix) with ESMTP id 73845C53F19 for ; Mon, 31 Jan 2005 21:26:29 -0500 (EST) Received: by web1.messagingengine.com (Postfix, from userid 99) id 7448044E0; Mon, 31 Jan 2005 21:26:30 -0500 (EST) Message-Id: <1107224790.13576.214020918@webmail.messagingengine.com> X-Sasl-Enc: FFagSt6ERIYo09omTmjrBtLjK4kiMbgMBxP2ke0Plisf 1107224790 From: "Sam Adams" To: pgsql-sql@postgresql.org Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) Subject: BLOBs vs BYTEA Date: Tue, 01 Feb 2005 02:26:30 +0000 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/3 X-Sequence-Number: 20114 Hi, Apologies if I've already sent a post asking this but I'm not sure if it actually went through last time as it doesn't seem to be in my sent items box. Anyway, I was wondering which would be a better way to store a large amount of files each a few megabytes in size. There could be hundreds of thousands of files altogether. If stored as BYTEAs this would put them all in a single table. Would this effect performance considerablely? I assume if there were thousands then it would. But if the data is stored as BLOBs then aren't they store inside the database just in another table? Wouldn't this also be undesirable. Would it be better to store them normally on the file system and just provide the path and file name in the database. Obviously this wont provide any security or backup but would it make sense to do it this way with such a large amount of data? Thanks. -Sam