Re: handle audiofiles in postgres

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: handle audiofiles in postgres
Дата
Msg-id 87ocpsf2jh.fsf@dba2.int.libertyrms.com
обсуждение исходный текст
Ответ на handle audiofiles in postgres  (edisan <urs.edisan@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [Q] optmizing postgres for 'single client' / many small queries
Следующее
От: Adam Rich
Дата:
Сообщение: Re: auto-increment in a view