pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Pre-sorting COPY FROM input
Date: Fri, 15 Mar 2013 20:26:58 +0200
Message-ID: <514367F2.1080402@vmware.com> (raw)
In-Reply-To: <87zjy4fu34.fsf@mid.deneb.enyo.de>
References: <87zjy4fu34.fsf@mid.deneb.enyo.de>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (2+ messages)

Message-ID: <514367F2.1080402@vmware.com>
Permalink:  ../514367F2.1080402@vmware.com/
Also on:    postgresql.org/message-id/514367F2.1080402@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: hlinnakangas@vmware.com, fw@deneb.enyo.de
  Subject: Re: Pre-sorting COPY FROM input
  In-Reply-To: <514367F2.1080402@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox