From: | Shaun Thomas <sthomas(at)optionshouse(dot)com> |
---|---|
To: | <tigran2-postgres(at)riatest(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Storing large files in multiple schemas: BLOB or BYTEA |
Date: | 2012-10-10 12:56:15 |
Message-ID: | 5075706F.3070903@optionshouse.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10/10/2012 05:16 AM, tigran2-postgres(at)riatest(dot)com wrote:
> I need to store large files (from several MB to 1GB) in Postgres
> database. The database has multiple schemas. It looks like Postgres
> has 2 options to store large objects: LOB and BYTEA. However we seem
> to hit problems with each of these options.
I believe the general consensus around here is to not do that, if you
can avoid it. File systems are much better equipped to handle files of
that magnitude, especially when it comes to retrieving them, scanning
through their contents, or really, any access pattern aside from simple
storage.
You're better off storing the blob on disk somewhere and storing a row
that refers to its location. Either key pieces for a naming scheme or
the full path.
This is especially true if you mean to later access that data with PHP.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas(at)optionshouse(dot)com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2012-10-10 13:06:20 | Re: Suggestions for the best strategy to emulate returning multiple sets of results |
Previous Message | Lars Helge Øverland | 2012-10-10 12:03:57 | Index only scan |