Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGZLN-0001sG-PW for pgsql-performance@arkaria.postgresql.org; Fri, 15 Mar 2013 18:27:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGZLN-0003zg-72 for pgsql-performance@arkaria.postgresql.org; Fri, 15 Mar 2013 18:27:05 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGZLM-0003zb-Bu for pgsql-performance@postgresql.org; Fri, 15 Mar 2013 18:27:04 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGZLL-0005CM-AN for pgsql-performance@postgresql.org; Fri, 15 Mar 2013 18:27:03 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id BD43428111; Fri, 15 Mar 2013 11:27:01 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id B958118249; Fri, 15 Mar 2013 11:27:01 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 1EBCCC15DC; Fri, 15 Mar 2013 11:27:00 -0700 (PDT) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-2.vmware.com Received: from zcs-prod-ext-mta-2.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-2.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BfRCKAVpTKoH; Fri, 15 Mar 2013 11:27:00 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id F04A2C153D; Fri, 15 Mar 2013 11:26:59 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Fri, 15 Mar 2013 11:26:59 -0700 (PDT) Message-ID: <514367F2.1080402@vmware.com> Date: Fri, 15 Mar 2013 20:26:58 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Florian Weimer CC: pgsql-performance@postgresql.org Subject: Re: Pre-sorting COPY FROM input References: <87zjy4fu34.fsf@mid.deneb.enyo.de> In-Reply-To: <87zjy4fu34.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -9.3 (---------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org 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