From: | Emi Lu <emilu(at)encs(dot)concordia(dot)ca> |
---|---|
To: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
Cc: | pgsql-general(at)postgresql(dot)org, PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org> |
Subject: | 500KB PDF files for postgresql8.3, which is the most efficient way? |
Date: | 2011-05-27 16:12:42 |
Message-ID: | 4DDFCD7A.8030902@encs.concordia.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Hello,
I'd like to have more comments about the following case:
. 500KB per PDF file; 30 files per year
. PSQL8.3
Solution:
====================
(1) Save pdfs to file system, only point file name in psql8.3
(2) Save oids of pdfs into table
(3) Save pdf files as bytea column in psql8.3
Pros and cons for (1), (2), (3), which is the most efficient way?
Thanks a lot!
Emi
On 05/27/2011 12:45 AM, Jasen Betts wrote:
> On 2011-05-26, Bosco Rama<postgres(at)boscorama(dot)com> wrote:
>
>> select * into temp table foo from maintable where primcol=123;
>> update foo set primcol = 456;
>> insert into maintable select * from foo;
>>
>> You also may need this is if you intend to use the same sequence of
>> calls on within the same session:
>>
>> drop table foo;
>
> Yet another way to do the same thing:
>
> begin;
>
> create temportary table foo on commit drop as
> select * from maintable where primcol=123;
> update foo, set primcol=456;
> insert into maintable select * from foo;
>
> commit;
>
From | Date | Subject | |
---|---|---|---|
Next Message | Per-Olov Esgard | 2011-05-27 16:12:50 | Re: Is there any problem with pg_notify and memory consumption? |
Previous Message | Gaetano Giunta | 2011-05-27 15:59:31 | adding applications to the stack builder |
From | Date | Subject | |
---|---|---|---|
Next Message | Emi Lu | 2011-05-27 16:15:00 | Re: 500KB PDF files for postgresql8.3, which is the most efficient way? |
Previous Message | Merlin Moncure | 2011-05-27 15:39:22 | Re: copy record? |