Discussion:
Pre-sorting COPY FROM input
(too old to reply)
Florian Weimer
2013-03-15 17:31:27 UTC
Permalink
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-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Heikki Linnakangas
2013-03-15 18:26:58 UTC
Permalink
Post by Florian Weimer
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-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Loading...