Re: handle audiofiles in postgres - Mailing list pgsql-general

From Christopher Browne
Subject Re: handle audiofiles in postgres
Date
Msg-id 87ocpsf2jh.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to handle audiofiles in postgres  (edisan <urs.edisan@gmail.com>)
List pgsql-general
urs.edisan@gmail.com (edisan) writes:
> Can anyone used or tell me how to handle audio files in postgres
>
> Audio files may be in  wav / vox / dss format and each have average 30 min
> running time.

In principle, you could store these as "BLOB" data; I'd quite prefer
storing this as "bytea" data.

The TOAST capability
<http://www.postgresql.org/docs/8.4/interactive/storage-toast.html>
means that these "BLOBs" are actually stored in side tables, which
should be good for efficiency in that they won't make data tuples
enormous even though there's enormous data tied to them.

As a result, queries on metadata (e.g. - the other attributes of the
data) can be nicely efficient despite the bulky data.

It's not obvious, however, that storing the files in the database is
preferable to:

 - Putting the files in a filesystem, perhaps with cryptic names
   (hashes?)

 - Storing the metadata about the files in the database, referencing the
   files' names

If there's good reason to store the files in the DBMS, then do so; just
make sure there's good reason for it!
--
let name="cbbrowne" and tld="ca.afilias.info" in name ^ "@" ^ tld;;
Christopher Browne
"Bother,"  said Pooh,  "Eeyore, ready  two photon  torpedoes  and lock
phasers on the Heffalump, Piglet, meet me in transporter room three"

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: [Q] optmizing postgres for 'single client' / many small queries
Next
From: Adam Rich
Date:
Subject: Re: auto-increment in a view