Re: Images in Database

From: "M(dot) Bastin" <marcbastin(at)mindspring(dot)com>
To: Reshat Sabiq <sabiq(at)purdue(dot)edu>
Cc: Rod K <rod(at)23net(dot)net>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Images in Database
Date: 2004-03-28 02:20:56
Message-ID: a0602041bbc8be4f1284d@[192.168.0.101]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At 5:33 PM -0600 3/27/04, Reshat Sabiq wrote:
>Valid point. Maintenance might be easier (although i don't think you
>can dump and move images easily to another DB;

Yes you can with COPY or pg_dump.

> you'd probably have to do some kind of direct connection to another
>DB to move them). When in a filesystem, you could bzip everything,
>and move them easily. There could also be an URL-prefix field for
>each client, followed by a URL suffix field for each image. Thus
>maintenance most of the time would be as easy as changing the prefix.

Like you say: "most of the time" and of course you'll run into the
other situations sooner or later...

>However, no matter how small an image is, it takes the same amount
>of BLOB space, doesn't it. This, IMHO, means a lot of wasted storage.

There is no wasted storage. You'll use up as much disk space whether
you store separate files or whether you put those bytes inside the
database. There's no minimum size for bytea data.

> Not sure if that also affects performance to some small degree.

Nope, your searches are done on indexes (which don't contain the image data).

Marc

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Roberto Rezende de Assis 2004-03-28 03:17:31 Doubt on foreign key and deletions
Previous Message Tom Lane 2004-03-28 01:16:23 Re: Images in Database