Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C6DAC9FA28E for ; Mon, 18 Dec 2006 14:01:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 54979-08 for ; Mon, 18 Dec 2006 14:00:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 029119F9F08 for ; Mon, 18 Dec 2006 14:00:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kBII0tYQ019299; Mon, 18 Dec 2006 13:00:55 -0500 (EST) To: "Steven Flatt" cc: pgsql-performance@postgresql.org Subject: Re: Insertion to temp table deteriorating over time In-reply-to: <357fa7590612180951q3da4c840l27caa82475444cfb@mail.gmail.com> References: <357fa7590612130844q58ef3ca5q31e164f9b006e0fc@mail.gmail.com> <25209.1166131396@sss.pgh.pa.us> <357fa7590612150821i3eca3f66ge2ced1ee20fa2dac@mail.gmail.com> <11651.1166202586@sss.pgh.pa.us> <357fa7590612150955g1b9c733duaf000c23d28aa8af@mail.gmail.com> <12508.1166206006@sss.pgh.pa.us> <357fa7590612151026t4ae033f6w5367cac9d0b67064@mail.gmail.com> <13947.1166209788@sss.pgh.pa.us> <357fa7590612151121x5f95102fj21a96b1bdc7eb002@mail.gmail.com> <20792.1166211026@sss.pgh.pa.us> <357fa7590612180951q3da4c840l27caa82475444cfb@mail.gmail.com> Comments: In-reply-to "Steven Flatt" message dated "Mon, 18 Dec 2006 12:51:13 -0500" Date: Mon, 18 Dec 2006 13:00:55 -0500 Message-ID: <19298.1166464855@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/466 X-Sequence-Number: 22522 "Steven Flatt" writes: > I can fix this problem by using CREATE TEMP TABLE ... LIKE instead of CREATE > TEMP TABLE ... AS. That seems ... um ... bizarre. Now are you able to put together a self-contained test case? Seems like we could have two independent bugs here: first, why (and how) is the temp table different, and second how does that result in the observed performance problem. regards, tom lane