Re: pg temp tables - Mailing list pgsql-general

From Anton Melser
Subject Re: pg temp tables
Date
Msg-id 92d3a4950703071326g127a44a9v45aed6246033e71e@mail.gmail.com
Whole thread Raw
In response to Re: pg temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 06/03/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Anton Melser" <melser.anton@gmail.com> writes:
> > Thanks for your reply. I am managing a db that has some export scripts
> > that don't do a drop/create, but rather a delete from at the start of
> > the proc (6 or 7 tables used for this, and only this). Now given that
> > there is no vacuuming at all going on - this is clearly suboptimal but
> > in the general case is this better/worse than using temporary tables?
>
> Delete all rows, you mean?  Have you considered TRUNCATE?

Hi,
... I have considered lots of things - but I didn't write the scripts!
Now that you mention it, I do remember that truncate is much better
than
delete from mytable;
That is not what they wrote but hey. But even then, what are the
advantages/disadvantages of temp tables? Is there a document somewhere
I can consult which will give me the lowdown on permanent (but
temporary) versus temporary tables in pg?
Cheers
Anton

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: invalid page header in pg_statistic
Next
From: "Webb Sprague"
Date:
Subject: Re: Database slowness -- my design, hardware, or both?