Re: COPY command details

From: Benjamin Arai <benjamin(at)araisoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: COPY command details
Date: 2007-03-30 04:30:47
Message-ID: 460C9277.5070708@araisoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I agree, this is true if I cannot defer index updates. But if it is
possible to defer index updates until the end then I should be able to
achieve some sort of speedup. Rebuilding an index can't be the
PostgreSQL solution for all cases. I am dealing with databases in the
hundreds of gigs range and I am adding about 10gigs of data a week. At
some point its going to take longer than a week to rebuild all of the
indexes in the database.

On the other hand, if I am to partition the data into several tables
then it might not be such a big deal since I am only adding and never
deleting... This makes it a little more of a pain in the ass.

Benjamin

Tom Lane wrote:
> Benjamin Arai <benjamin(at)araisoft(dot)com> writes:
>
>> I would prefer not to drop the index because the database is several
>> hundred gigs. I would prefer to incrementally add to the index.
>>
>
> This may well be false economy. I don't have numbers at hand, but a
> full rebuild can be substantially faster than adding a large number
> of rows to the index incrementally. Also, you don't end up with a
> physically disordered index, so there is some ongoing performance
> benefit.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerald Timothy G Quimpo 2007-03-30 04:56:23 Re: COPY command details
Previous Message Lew 2007-03-30 01:57:09 Re: Deleted Flag/Unique Constraint