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 8966A8B9CE3 for ; Tue, 1 Feb 2005 07:28:32 +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 22156-10 for ; Tue, 1 Feb 2005 07:28:21 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by svr1.postgresql.org (Postfix) with ESMTP id 966708B9B27 for ; Tue, 1 Feb 2005 07:28:20 +0000 (GMT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id j1184meM002584; Tue, 1 Feb 2005 10:04:48 +0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id j1184jDR002580; Tue, 1 Feb 2005 10:04:47 +0200 Date: Tue, 1 Feb 2005 10:04:45 +0200 (EET) From: Achilleus Mantzios To: Dennis Sacks Cc: Sam Adams , Subject: Re: BLOBs vs BYTEA In-Reply-To: <41FEFCAA.5070603@illusions.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/17 X-Sequence-Number: 20128 O Dennis Sacks έγραψε στις Jan 31, 2005 : > 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. I think if you are doing replication or write in java, you'll be much happier with bytea. > > Dennis Sacks > dennis@illusions.com > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- -Achilleus