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 945979DC888 for ; Fri, 10 Feb 2006 06:04:30 -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 43638-08 for ; Fri, 10 Feb 2006 06:04:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (serval.logix-tt.com [213.239.221.42]) by postgresql.org (Postfix) with ESMTP id 227CB9DC894 for ; Fri, 10 Feb 2006 06:04:27 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (Mc547.m.pppool.de [89.49.197.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 68A9024400F; Fri, 10 Feb 2006 11:04:32 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 664A518189FA9; Fri, 10 Feb 2006 11:04:33 +0100 (CET) Message-ID: <43EC6531.60202@logix-tt.com> Date: Fri, 10 Feb 2006 11:04:33 +0100 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: Greg Stark Cc: Orion Henry , pgsql-performance@postgresql.org Subject: Re: Large Database Design Help References: <43EB92DA.2080607@orangekids.org> <87ek2c71vl.fsf@stark.xeocode.com> In-Reply-To: <87ek2c71vl.fsf@stark.xeocode.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.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200602/100 X-Sequence-Number: 17086 Hi, Greg, Greg Stark wrote: >> (Aside question: if I were to find a way to use COPY and I were loading >>data on a single client_id, would dropping just the indexes for that client_id >>accelerate the load?) > Dropping indexes would accelerate the load but unless you're loading a large > number of records relative the current size I'm not sure it would be a win > since you would then have to rebuild the index for the entire segment. And, additionally, rebuilding a partial index with "WHERE client_id=42" needs a full table scan, which is very slow, so temporarily dropping the indices will not be useful if you merge the tables. Btw, I don't know whether PostgreSQL can make use of partial indices when building other partial indices. If yes, you could temporarily drop all but one of the partial indices for a specific client. 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