Re: pdf saving into DB vs. saving file location ?

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: pdf saving into DB vs. saving file location ?
Дата
Msg-id AANLkTikBG9N9MNK+8YD8VWENQ08RYeJkqE-22DZBn3kz@mail.gmail.com
обсуждение исходный текст
Ответ на pdf saving into DB vs. saving file location ?  (Emi Lu <emilu@encs.concordia.ca>)
Список pgsql-general
On Wed, Mar 23, 2011 at 4:01 PM, Emi Lu <emilu@encs.concordia.ca> wrote:
> A question about saving PDF (size around 160kb) into postgresql large object
> columns vs. saving into a directory.
>
> May I know the performance differences? Pros and crons please?
>
> Each year, 20 new pdfs will be saved into DB (each around 160KB).
>

Just store them in bytea fields.  No need for large objects at all.

We store images this way, and put a CDN in front of the web server
that pulls them from the DB, so the DB is rarely hit for such things.
The benefit of having everything managed within a single transaction
to the DB is worth the complexity of having the CDN.

Seeing as you only have about 20 per year, that's just a no-brainer to
store them in the DB.

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

Предыдущее
От: Nick Raj
Дата:
Сообщение: Re: Understanding Datum
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Understanding Datum