From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Marcus Andree S(dot) Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: sharing temporary tables |
Date: | 2004-08-24 15:55:14 |
Message-ID: | 4300.1093362914@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
"Marcus Andree S. Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br> writes:
> Do temp tables reside on disk or in RAM?
They are files, just like every other table in Postgres. To the extent
that you have RAM to spare, the kernel will keep the contents of active
files in memory, so it's quite possible for a table to behave as though
it's in RAM (at least in terms of read speed).
> Can different connections
> access (share) data located in a temporary table created by a
> previous connection/process?
No. Temp tables are local to a single session. There are a number of
performance optimizations associated with that, which boil down to the
fact that other sessions couldn't see a consistent state of the data in
a temp table even if they looked (which they won't).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Crawford | 2004-08-24 17:31:41 | Re: MySQL vs PostgreSQL |
Previous Message | Oliver Elphick | 2004-08-24 14:57:07 | Re: authentication |