From: Emi Lu <emilu@encs.concordia.ca>
To: Jasen Betts <jasen@xnet.co.nz>
Cc: pgsql-general@postgresql.org, PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: 500KB PDF files for postgresql8.3, which is the most efficient way?
Date: Fri, 27 May 2011 12:12:42 -0400
Message-ID: <4DDFCD7A.8030902@encs.concordia.ca> (raw)
In-Reply-To: <irna9r$dso$3@reversiblemaps.ath.cx>
References: <482E80323A35A54498B8B70FF2B87980049413B5EB@azsmsx504.amr.corp.intel.com>
<482E80323A35A54498B8B70FF2B87980049413B673@azsmsx504.amr.corp.intel.com>
<4DDEC3B1.2050008@boscorama.com>
<irna9r$dso$3@reversiblemaps.ath.cx>
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@boscorama.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;
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: emilu@encs.concordia.ca, jasen@xnet.co.nz
Subject: Re: 500KB PDF files for postgresql8.3, which is the most efficient way?
In-Reply-To: <4DDFCD7A.8030902@encs.concordia.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox