Re: Filesystem vs. Postgres for images - Mailing list pgsql-general

From Jeremiah Jahn
Subject Re: Filesystem vs. Postgres for images
Date
Msg-id 1081865891.17577.54.camel@bluejay.goodinassociates.com
Whole thread Raw
In response to Re: Filesystem vs. Postgres for images  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
I tried the bytea types, but the parsing done by the system on insert
etc. was so bad that it made it usable for me. Our solution is to keep
all of the metadata in the db plus an id and then a web service that
gets the image from the FS.

On Tue, 2004-04-13 at 09:05, Joshua D. Drake wrote:
> Hello,
>
> No standard way that I know of :). We tend to use BLOBS because we can
> have associated tables
> with metadata about the images that can be searched etc.... Of course
> you could that with the filesystem
> as well but we find blobs easier.
>
> I will say we tend to use BLOBS or Bytea.
>
> J
>
>
> Jeremiah Jahn wrote:
>
> >There has got to be some sort of standard way to do this. We have the
> >same problem where I work. Terabytes of images, but the question is
> >still sort of around "BLOBs or Files?" Our final decision was to use the
> >file system. We found that you didn't really gain anything by storing
> >the images in the DB, other than having one place to get the data from.
> >The file system approach is much easier to backup, because each image
> >can be archived separately as well as browsed by 3rd party tools.
> >
> >-jj-
> >
> >
> >On Tue, 2004-04-13 at 07:40, Cott Lang wrote:
> >
> >
> >>On Tue, 2004-04-13 at 01:44, Michal Hlavac wrote:
> >>
> >>
> >>>Hello,
> >>>
> >>>I am working on web portal. There are some ads. We have about 200 000
> >>>ads. Every ad have own directory called ID, where is 5 subdirectories
> >>>with various sizes of 5 images.
> >>>
> >>>Filesystem is too slow. But I don't know, if I store these images into
> >>>postgres, performace will grow.
> >>>
> >>>
> >>Consider breaking your directories up, i.e.:
> >>
> >>/ads/(ID % 1000)/ID
> >>
> >>I use that for a system with several million images, works great. I
> >>really don't think putting them in the database will do anything
> >>positive for you. :)
> >>
> >>
> >>
> >>
> >>
> >>
> >>---------------------------(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
> >>
> >>
--
Jeremiah Jahn <jeremiah@cs.earlham.edu>


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: performance problem aftrer update from 7.1 to 7.4.2
Next
From: Christopher Petrilli
Date:
Subject: Re: Filesystem vs. Postgres for images