Lists: | pgsql-sql |
---|
From: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com> |
---|---|
To: | PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Temporary tables and indexes |
Date: | 2002-10-08 07:28:44 |
Message-ID: | 20021008072844.5322.qmail@web80310.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Hi :
Are the indices of a temporary table automatically
"dropped" together its corresponding temporary table
after a database session?
ludwig.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>, PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Temporary tables and indexes |
Date: | 2002-10-08 15:36:28 |
Message-ID: | web-1775416@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Ludwig,
> Are the indices of a temporary table automatically
> "dropped" together its corresponding temporary table
> after a database session?
I'm kind of surprised that it's possible to index a temporary table.
There's not much point in doing so.
Yes, the indexes would be dropped as well.
-Josh Berkus
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
Cc: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>, PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Temporary tables and indexes |
Date: | 2002-10-09 04:45:12 |
Message-ID: | 17309.1034138712@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
"Josh Berkus" <josh(at)agliodbs(dot)com> writes:
> I'm kind of surprised that it's possible to index a temporary table.
> There's not much point in doing so.
Why not? You seem to be equating "temporary" with "small", but I don't
see why that must be so.
regards, tom lane
From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Josh Berkus" <josh(at)agliodbs(dot)com> |
Cc: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>, PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Temporary tables and indexes |
Date: | 2002-10-09 04:49:18 |
Message-ID: | web-1776588@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Tom,
> > I'm kind of surprised that it's possible to index a temporary
> table.
> > There's not much point in doing so.
>
> Why not? You seem to be equating "temporary" with "small", but I
> don't
> see why that must be so.
Nah. I'm equating "temporary" with "query twice and throw away", which
isn't necessarily what everyone else does.
BTW, Ludwig, in postgresql versions < 7.2.0, I noticed that sometimes
indexes didn't seem to completely go away (i.e. I would get a name
conflict if I tried to drop & re-create in the same transaction)
without a VACUUM. If you're using 7.1.3, you should upgrade for this
reason.
-Josh Berkus