Guideline on use of temporary tables

From: "Jimmy Choi" <yhjchoi(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Guideline on use of temporary tables
Date: 2007-10-12 20:28:19
Message-ID: 5770602b0710121328gf25bbd3i4196961fb2adb1f2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wido 2007-10-12 21:25:29 Re: Importing MySQL dump into PostgreSQL 8.2
Previous Message Jack Orenstein 2007-10-12 20:06:09 Re: [OT] xkcd - A webcomic of romance, sarcasm, math, and language