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 7D8E48B9DFE for ; Tue, 1 Feb 2005 03:49:55 +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 96616-08 for ; Tue, 1 Feb 2005 03:49:46 +0000 (GMT) Received: from illusions.com (unknown [69.28.129.146]) by svr1.postgresql.org (Postfix) with SMTP id CD7868B9CE5 for ; Tue, 1 Feb 2005 03:49:46 +0000 (GMT) Received: (qmail 5648 invoked from network); 1 Feb 2005 03:50:54 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by illusions.com with SMTP; 1 Feb 2005 03:50:54 -0000 Message-ID: <41FEFCAA.5070603@illusions.com> Date: Mon, 31 Jan 2005 20:51:06 -0700 From: Dennis Sacks User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Adams Cc: pgsql-sql@postgresql.org Subject: Re: BLOBs vs BYTEA References: <1107224790.13576.214020918@webmail.messagingengine.com> In-Reply-To: <1107224790.13576.214020918@webmail.messagingengine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.247 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/5 X-Sequence-Number: 20116 Sam Adams wrote: >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? > > This is one of those age old debates. I've done both, and I'll tell you that in my experience it is less of a headache to store the files in the filesystem (which is what filesystems are designed for) and store the metadata in the database. Dennis Sacks dennis@illusions.com