[SQL] Temporary tables and indexes

2002-10-08 Thread Ludwig Lim
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

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Josh Berkus
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.

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Ian Harding
Sure there is! There are queries that benefit from having a temporary table created for a subquery and the temporary table indexed before the join. Since we can't easily return result sets from functions yet, it's not probably used that much, but from within a function, I can see why you

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] 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

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Josh Berkus
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