Re: Pre-sorting COPY FROM input

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Pre-sorting COPY FROM input
Date: 2013-03-15 18:26:58
Message-ID: 514367F2.1080402@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 15.03.2013 19:31, Florian Weimer wrote:
> Does it make sense to pre-sort COPY FROM input to produce long runs of
> increasing values of an indexed column, or does PostgreSQL perform
> this optimization on its own?

PostgreSQL doesn't do that sort of an optimization itself, so yeah, if
the random I/O of index updates is a problem, pre-sorting the input
should help.

- Heikki

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2013-03-15 18:55:08 Re: New server setup
Previous Message Rick Otten 2013-03-15 18:06:02 Re: New server setup