Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mORrT-0001jK-0A for pgsql-general@arkaria.postgresql.org; Thu, 09 Sep 2021 21:45:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mORrQ-0004jG-2b for pgsql-general@arkaria.postgresql.org; Thu, 09 Sep 2021 21:45:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mORrP-0004j7-Pr for pgsql-general@lists.postgresql.org; Thu, 09 Sep 2021 21:45:31 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mORrL-00065P-Cq for pgsql-general@lists.postgresql.org; Thu, 09 Sep 2021 21:45:30 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 85A5A5581; Thu, 9 Sep 2021 23:45:25 +0200 (CEST) Date: Thu, 9 Sep 2021 23:45:25 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: update non-indexed value is slow if some non-related index/fk are enabled Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <2875218.1630855266@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YKW6NACUsXokPC5E" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YKW6NACUsXokPC5E Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-09-06 07:13:07 -0700, David G. Johnston wrote: > On Monday, September 6, 2021, Philippe Doussot > wrote: >=20 > I whas hopping the same optimisation as you: Write in place. >=20 > How exactly would you expect =E2=80=9Cupdate-in-place=E2=80=9D to work gi= ven the nature of > MVCC? Some databases (e.g. Oracle) store the old row in a separate place (called an UNDO segment in Oracle) and then overwrite the row in place. When another transaction tries to access the (not yet committed) row or when the transaction is rolled the old row is retrieved from the undo segment. There are pros and cons to both approaches. Personally, I had less problems with PostgreSQL's approach than with Oracle's. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --YKW6NACUsXokPC5E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmE6gHAACgkQ8g5IURL+ KF2PEg//fjTbdJlGmRPuIfERSfFZd0VwCSE+ykXZXPXyaDy6fU9TGbzEmgXEzUMF 4/KuoBkqM+1xr0TxpWr1oygQKkGq0Nl+I4QgVPOSbZoPL1M4VxR34RrvhMPxVukZ W8YBUrJS36JWwsLqGKvABT3rO+PEmHTDoIFiBwVEPFTjLGQcLOa9/OPnY26NuJdV EklzTJ7fhGm71WW9jtX/PinK3DldkRxq2MBKtyyCtjgK0bfbHavlCFiFZPQYvz1a 68B3iWpjNNYmvtwUUvTg3YEZwjKgqu3uVnffKtzxdA18eazSIxe5b0ZsQwWpAAbG 61Y2iuLQ+ReqjS+Pt+52rXiO+KfD0lZTPUTTU91f7NHjk7NIchSQFiwVySYafwe3 qYJKPypUWXyRVtEeSXrId9vc24JpIA8HPdHjxlqY/sZwcqI2d/p1gqFuVpA3EHGR zs9PHaHhJbTCzC7+Ag/zvbX9w6IYIDjwekwiVjSS/7pMMmH1qLc2OcyF+2rkVJxn aGlQcd3Lz7b3kDy7zJpUrNuTV3aClbYPisdfmZ7GPJP11bbvMI8FE1vUcJWCat6M PXZ9UFIsxHk97zgFzRBQSzYe9c+66KDeallVnpwa7pnUhcfZFt0Uo1uHSNOQ++Em fYZm1AfOwBjcnbLlTmNNbDY/A/htpDCt/8ZzvS3ZMZ/I9yCimUQ= =RpUI -----END PGP SIGNATURE----- --YKW6NACUsXokPC5E--