Guideline on use of temporary tables - Mailing list pgsql-general

From Jimmy Choi
Subject Guideline on use of temporary tables
Date
Msg-id 5770602b0710121328gf25bbd3i4196961fb2adb1f2@mail.gmail.com
Whole thread Raw
Responses Re: Guideline on use of temporary tables  (Richard Huxton <dev@archonet.com>)
Re: Guideline on use of temporary tables  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-general
I'm looking for general guideline on the use of temporary tables.

I would like to use temporary table as a caching mechanism to speed up
queries within the same session. Specifically, a temporary table is
created to store a subset of data from a possibly large table, and
subsequent queries select from the temporary table instead of
re-applying the same complex filters on the actual table again and
again.

Is this what temporary table is designed for? Are there caveats that I
should be aware of? Can you think of other better alternatives?

Thank you very much.

pgsql-general by date:

Previous
From: Jack Orenstein
Date:
Subject: Re: [OT] xkcd - A webcomic of romance, sarcasm, math, and language
Next
From: Andreas
Date:
Subject: can I define own variables?