Re: Storing Video's or vedio file in DB.

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Storing Video's or vedio file in DB.
Дата
Msg-id 5491CCC0.5050807@hogranch.com
обсуждение исходный текст
Ответ на Re: Storing Video's or vedio file in DB.  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
On 12/17/2014 4:55 AM, Thomas Kellerer wrote:
> Turns out the Postgres as well isn't really slower at this than the file system.
>
> For small files around 50k both perform similar: the average time to read the blob from a bytea column was around 2ms
whereasthe average time to read the blob from the filesystem was around 1ms. The test uses 50 threads to read the blobs
usingthe PK of the table. 
>
> "Reading from the filesystem" means looking up the path for the file in the database table and then reading the file
fromthe filesystem. 
>
> For larger files around 250k Postgres was actually faster in my tests: 130ms reading the bytea column vs. 260ms
readingthe file from disk. 

with videos, we're likely looking at file sizes in the 100MB to
multi-gigabyte range, unless these are just short snippets.   I'm not
very familiar with django and python, does it have facilities to stream
a very large record, or does it always transfer the whole thing as a
chunk in memory?   Does it have PostgreSQL Large Object support?

Also, serving video via a webserver, this is generally done with a html5
or flash streaming server, where the web application generates the
embedded link to the video, but the video itself comes from said
streaming thing....  those streaming things are less likely to be able
to read a object out of postgres than they are to stream from the file
system.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



В списке pgsql-general по дате отправления:

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Storing Video's or vedio file in DB.
Следующее
От: harpagornis
Дата:
Сообщение: Re: SSL Certificates in Windows 7 & Postgres 9.3