Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0TJOvl05423 for ; Tue, 29 Jan 2002 14:24:57 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id 19F2668A68 for ; Tue, 29 Jan 2002 13:24:57 -0600 (CST) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 48ACA68A5A for ; Tue, 29 Jan 2002 13:24:56 -0600 (CST) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 16VdsF-0000bg-00 for ; Tue, 29 Jan 2002 13:24:55 -0600 Date: Tue, 29 Jan 2002 13:24:55 -0600 From: "Ross J. Reedstrom" To: pgsql-admin@postgresql.org Subject: [azhang@verisign.com: RE: tuning SQL] Message-ID: <20020129192455.GA2290@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , pgsql-admin@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200201/247 X-Sequence-Number: 3128 Just to complete the thread. Ross ----- Forwarded message from "Zhang, Anna" ----- From: "Zhang, Anna" To: "'Ross J. Reedstrom'" Subject: RE: [ADMIN] tuning SQL Date: Tue, 29 Jan 2002 14:08:53 -0500 Return-Receipt-To: "Zhang, Anna" X-Virus-Scanned: by AMaViS snapshot-20010714 I had same thought as you. select into temp table only took a minute, then insert into contact took 1 hour. Thanks! Anna Zhang -----Original Message----- From: Ross J. Reedstrom [mailto:reedstrm@rice.edu] Sent: Tuesday, January 29, 2002 1:46 PM To: Zhang, Anna Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] tuning SQL So, how long does the just the select take? You might be running into something odd with selecting from and inserting into the same table: I'm not sure of the visibility rules here. You might be better off selecting into a new temp table (see: SELECT INTO) then inserting from that. Ross ----- End forwarded message -----