Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 23, 2011 at 4:01 PM, Emi Lu <emilu@xxxxxxxxxxxxxxxxx> 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.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux