Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id AAAE54762C1 for ; Wed, 8 May 2002 17:13:36 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 5E01047620D for ; Wed, 8 May 2002 16:37:41 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g48KbVW12312; Wed, 8 May 2002 16:37:31 -0400 (EDT) To: "Vilson farias" Cc: pgsql-admin@postgresql.org Subject: Re: Performance question related with temporary tables In-reply-to: <006501c1f69d$6d6357d0$98a0a8c0@dgtac> References: <002f01c1f691$8fcea560$98a0a8c0@dgtac> <1901.1020867435@sss.pgh.pa.us> <006501c1f69d$6d6357d0$98a0a8c0@dgtac> Comments: In-reply-to "Vilson farias" message dated "Wed, 08 May 2002 11:34:12 -0300" Date: Wed, 08 May 2002 16:37:31 -0400 Message-ID: <12309.1020890251@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200205/69 X-Sequence-Number: 4244 "Vilson farias" writes: >> You just do it. > Great, it's so simple... thanks Tom. > I just have another two questions : > Is the index automaticly removed when connection is closed? > The index is visible only in the actual session, am I right? Yup. An index on a temp table is temp in just the same way as the temp table itself. There's no "TEMP" option in CREATE INDEX, it's just done that way for you. (Any toast table needed is also handled correctly, although the mechanism is slightly different.) regards, tom lane