dbTalk Databases Forums  

sharing temporary tables

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss sharing temporary tables in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marcus Andree S. Magalhaes
 
Posts: n/a

Default sharing temporary tables - 08-24-2004 , 08:56 AM







Hi guys,

After some tests, I have a couple questions regarding temporary
tables in Postgres... Hope someone more knowledgeable can
drop me a few lines and put some light into my own darkness.

Do temp tables reside on disk or in RAM? Can different connections
access (share) data located in a temporary table created by a
previous connection/process? How?

Any help is grateful.

Thanks.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: sharing temporary tables - 08-24-2004 , 10:55 AM






"Marcus Andree S. Magalhaes" <marcus.magalhaes (AT) vlinfo (DOT) com.br> writes:
Quote:
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).

Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.