X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 204CE924FB4 for ; Tue, 20 May 2003 12:04:49 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 97846-05 for ; Tue, 20 May 2003 12:04:42 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by developer.postgresql.org (Postfix) with ESMTP id 4130D924F8B for ; Tue, 20 May 2003 12:04:41 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4KG4aU6029495; Tue, 20 May 2003 12:04:36 -0400 (EDT) To: Jeff Boes Cc: pgsql-sql@postgresql.org Subject: Re: Performance on temp table inserts In-reply-to: <1053434229.4973.1.camel@takin.private.nexcerpt.com> References: <26320.1053406306@sss.pgh.pa.us> <1053434229.4973.1.camel@takin.private.nexcerpt.com> Comments: In-reply-to Jeff Boes message dated "20 May 2003 08:37:09 -0400" Date: Tue, 20 May 2003 12:04:36 -0400 Message-ID: <29494.1053446676@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/386 X-Sequence-Number: 13551 Jeff Boes writes: >>> What factors affect the performance of a temp table insert? >> >> PG version would have a lot to do with that, considering how we've >> whacked around the temp-table implementation in the last few releases. > PG version is 7.2.4. IIRC, temp tables are really indistinguishable from regular tables in 7.2, as far as performance goes. The bottleneck for the bare insert itself would probably be WAL --- are you sure all the WAL settings are the same on the two boxes? If you have indexes, foreign keys, triggers, rules, etc on the table then of course you have other overhead to worry about ... but that seems somewhat unlikely for a temp table. Also, is the temp table being filled in the same transaction that created it, or in separate transaction(s)? That makes a difference in 7.2 and before (but not in 7.3). regards, tom lane