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