X-Original-To: pgsql-sql@postgresql.org Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by postgresql.org (Postfix) with ESMTP id 232F6475A71 for ; Thu, 13 Mar 2003 19:20:36 -0500 (EST) Received: from stark.dyndns.tv (H162.C233.tor.velocet.net [216.138.233.162]) by sabre.velocet.net (Postfix) with ESMTP id 066A3138152; Thu, 13 Mar 2003 19:20:38 -0500 (EST) Received: from localhost ([127.0.0.1] helo=stark.dyndns.tv ident=foobar) by stark.dyndns.tv with smtp (Exim 3.36 #1 (Debian)) id 18tcw9-00062t-00; Thu, 13 Mar 2003 19:20:37 -0500 To: Kurt Overberg Cc: pgsql-sql@postgresql.org Subject: Re: massive INSERT References: <3E70C3BC.40904@hotdogrecords.com> In-Reply-To: <3E70C3BC.40904@hotdogrecords.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 13 Mar 2003 19:20:36 -0500 Message-ID: <873clqer3f.fsf@stark.dyndns.tv> Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200303/346 X-Sequence-Number: 12385 Kurt Overberg writes: > ...I've found this to be faster then running the query, figuring out who needs > to be removed from the group, who needs to be added and whatnot. The thing that > I'm worried about is that this table is going to be pretty big (potentially > millions of rows), and everytime I rebuild this table I lose (or at least > invalidate) all my indexes. Is that the case? Is constantly deleting then > adding large numbers of rows from a table really bad for performance? I'm > worried this isn't going to scale well. Anyone know of a better way to do > this? Thoughts and comments would be appreciated.