Re: Large Database Design Help

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Orion Henry <lab(at)orangekids(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Large Database Design Help
Date: 2006-02-10 10:04:33
Message-ID: 43EC6531.60202@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Schaber 2006-02-10 10:24:42 Re: Large Database Design Help
Previous Message James Dey 2006-02-10 09:55:49 Re: Basic Database Performance