Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVmgg-0006DT-Vn for pgsql-general@arkaria.postgresql.org; Sun, 31 Dec 2017 23:06:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVmgf-0005R0-Uz for pgsql-general@arkaria.postgresql.org; Sun, 31 Dec 2017 23:06:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eVmgf-0005Qq-Kt for pgsql-general@lists.postgresql.org; Sun, 31 Dec 2017 23:06:37 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eVmgc-0001Qy-Qt for pgsql-general@postgresql.org; Sun, 31 Dec 2017 23:06:37 +0000 Received: by mail-io0-x230.google.com with SMTP id t63so8711659iod.0 for ; Sun, 31 Dec 2017 15:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=ph51k6mzPWjBoGmOPbGtqqSEQNQMREMuVnrJO013FAo=; b=aZDXrbjFQUzHQ61z9/dGfn40TE8N65y5Uap3pWEey2LMsPY8mxZdTDdsmyr188FUcS y/WYfiz9iayrpFJ52zk/vXnrNcD+Qc557QtcLpuA5gLLEt0jILCRsm79Zpp9jSD6Ude/ 5oAZ9OA1MVGqcVh8q5jmOslA8PK3AvJI9Wilk5bBmQ76ZByxJK+jM4U+KaZnr0CA5HNA vXcEgywSZ0MSS1B8T8RqyorH8ffncQOcfxScHM3gLnumAp2MmoBFCn1SgPEFWGg3BH0f Ec57r3XvUbycXwqz+NqDx8XX3DbbmrwGfp36ojXAF7B/bm45i+Xr0FPzBMHlCg/ctt8T mj5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=ph51k6mzPWjBoGmOPbGtqqSEQNQMREMuVnrJO013FAo=; b=rlRNNM4RrBD3mzBGbpcuPngS+CZ07LFBqYni8y3HtyorphbJJQ5a/5smZ7toR29A1c u6ICarRfE5rs6mXYql1Vrmh6nd320fmlxBNrWoSLLHD7OLRWqMvlOA+tzNv9cqURyDnV +veVOOhl81ahRqCy/JISFZcZTMDLKgfwQsj4W127W27ihk4a0xTQKpEYawh/iGFoqS0J MNUPy8+YE3ef/A9JDnHdVNiN1UBd9aR7M5TvKmNzC9NjQo6OBPAMlCZzrSI83tTqGm8/ ROw0OqlwMUex/pkJq7tx3PwhuMsKcfKjpzIhdsHhHQ5+rYVU540BBczxJhCvYqeG1oWj +x1w== X-Gm-Message-State: AKGB3mJowEHB72KLVg416AqF0H2XPIEIsbP3EK0ysMg6riRKKciPOFE9 R9ipT1bdcZoBGQAnW16PBdhzugIh X-Google-Smtp-Source: ACJfBotWe4g/rZmXjAQTOH992VAQQ46OYOa7Ws1VV32LQSVeRXE3G9/Hjz53rSDyhbN31w8SMc4veQ== X-Received: by 10.107.89.15 with SMTP id n15mr26650166iob.280.1514761592128; Sun, 31 Dec 2017 15:06:32 -0800 (PST) Received: from ?IPv6:2601:681:5500:1e3c:6563:f150:4f70:8266? ([2601:681:5500:1e3c:6563:f150:4f70:8266]) by smtp.gmail.com with ESMTPSA id 125sm21757164ioo.68.2017.12.31.15.06.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Dec 2017 15:06:31 -0800 (PST) From: Rob Sargent Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: is single row update improved with function Message-Id: Date: Sun, 31 Dec 2017 16:06:30 -0700 To: "pgsql-general@postgresql.org" X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I must update 3M of 100M records, with tuple specific modifications. I = can generate the necessary sql, but I=E2=80=99m wondering if files of = simple update statements affecting a single row is more effective than = files of a function call doing the same update given the necessary = values, including where clause restrictions? The query plan set by the = first should be decent for the remainder. Alternatively, would a bulk load into a table of replacement values and = join info be the fastest way? =20 Either way I can break the updates into roughly 393 transactions (7500 = rows affected per tx) or 8646 transactions (350 rows per tx) if less is = more in this world. I=E2=80=99ll be the only user during this work. OS=3Dcentos 7, 4core virtual 64G memory; pg=3D10.0;=