pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Pre-sorting COPY FROM input
2+ messages / 2 participants
[nested] [flat]

* Pre-sorting COPY FROM input
@ 2013-03-15 17:31 Florian Weimer <fw@deneb.enyo.de>
  2013-03-15 18:26 ` Re: Pre-sorting COPY FROM input Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Florian Weimer @ 2013-03-15 17:31 UTC (permalink / raw)
  To: pgsql-performance

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?


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Pre-sorting COPY FROM input
  2013-03-15 17:31 Pre-sorting COPY FROM input Florian Weimer <fw@deneb.enyo.de>
@ 2013-03-15 18:26 ` Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2013-03-15 18:26 UTC (permalink / raw)
  To: Florian Weimer <fw@deneb.enyo.de>; +Cc: 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


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-03-15 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 17:31 Pre-sorting COPY FROM input Florian Weimer <fw@deneb.enyo.de>
2013-03-15 18:26 ` Heikki Linnakangas <hlinnakangas@vmware.com>

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