Re: How to write a function that manipulates a set of results

From: Ashley Moran <work(at)ashleymoran(dot)me(dot)uk>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: How to write a function that manipulates a set of results
Date: 2007-03-15 09:35:44
Message-ID: 9D92558B-7D89-4F2D-8918-78EB917D7F89@ashleymoran.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 15 Mar 2007, at 00:21, Tom Lane wrote:

>> Temp tables stay in RAM until they are bigger than temp_buffers.
>> If you
>> need them to be big and quick, maybe it would be appropriate to use
>> indexes (note these count towards temp_buffers), ANALYZE, etc.
>
> You do need to realize that creation of a temp table involves making
> entries in the system catalogs. If you can set it up so that you
> reuse
> the same temp table(s) for the life of a connection, you'll save a lot
> of thrashing and need for catalog vacuuming (the ON COMMIT DELETE ROWS
> option for temp tables might help here). Other than that gotcha, they
> should be pretty efficient.

Thanks for these tips, they are extremely useful

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Coleman 2007-03-15 10:19:23 Re: Plperl Question
Previous Message Peter Eisentraut 2007-03-15 06:41:18 Re: Native type for storing fractions (e.g 1/3)?