Temporary tables

From: Pawel Pierscionek <pawel(at)astercity(dot)net>
To: pgsql-sql <pgsql-sql(at)postgreSQL(dot)org>
Subject: Temporary tables
Date: 1999-01-11 22:39:11
Message-ID: 19985.990111@astercity.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I have to play a lot with temp tables.
Could you pls, give me a hint on emulating them under Postgres.

I have to use them quite often and with 10000 rows each.
I don't use indices cause I only cache a search result and don't need
any sorting, searching on temptables.

What's faster:

1)
once:
create tmptable;

many times:
delete from tmptable;
insert into tmptable select ... ;

or

2)
many times:
drop tmptable;
select ... into tmptable;

I prefer the second way since I have a lot of concurrent access and
create unique named tables under each transaction.
Unfortunately the DROP thing dumps a core under PLPGSQL function. :(

TIA,
Pawel

Browse pgsql-sql by date

  From Date Subject
Next Message Dirk Lutzebaeck 1999-01-12 09:42:57 Re: [SQL] storing strings with embedded '\'
Previous Message Frank Morton 1999-01-11 22:13:57 Re: [SQL] storing strings with embedded '\'