X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3712C9DCBB2 for ; Tue, 28 Mar 2006 12:18:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96875-07 for ; Tue, 28 Mar 2006 12:18:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 7B1DB9DCBA4 for ; Tue, 28 Mar 2006 12:18:37 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (T8b28.t.pppool.de [89.55.139.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id C2C65656CF; Tue, 28 Mar 2006 18:19:14 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id D9753185433DA; Tue, 28 Mar 2006 18:18:44 +0200 (CEST) Message-ID: <442961E4.3010001@logix-tt.com> Date: Tue, 28 Mar 2006 18:18:44 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ashah Cc: pgsql-performance@postgresql.org Subject: Re: Massive Inserts Strategies References: <200603221032.10207.ashah@opuspro.com> <20060322160924.GJ15742@pervasive.com> <200603281059.49790.ashah@opuspro.com> In-Reply-To: <200603281059.49790.ashah@opuspro.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200603/545 X-Sequence-Number: 17982 Hi, ashah, ashah wrote: > I tried this solution, but ran into following problem. > > The temp_table has columns (col1, col2, col3). > > The original_table has columns (col0, col1, col2, col3) > Now the extra col0 on the original_table is the unique generated ID by > the database. INSERT INTO original_table (col1, col2, col3) SELECT col1, col2, col3 FROM temp_table WHERE ... HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org