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 1kkZ20-0004d3-0i for pgsql-general@arkaria.postgresql.org; Wed, 02 Dec 2020 20:47:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkZ1y-0002p5-CU for pgsql-general@arkaria.postgresql.org; Wed, 02 Dec 2020 20:47:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkYip-0006NW-SB for pgsql-general@lists.postgresql.org; Wed, 02 Dec 2020 20:27:31 +0000 Received: from mr85p00im-hyfv06011401.me.com ([17.58.23.191]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkYin-0004xL-4d for pgsql-general@postgresql.org; Wed, 02 Dec 2020 20:27:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1606940847; bh=5QjRw8N5v51QnlQyeBK0sOX1WEZtaOsFrLo9gX29tOc=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type; b=zMypZ9WDWIzHgP9St+W3zT1/QItQEQmezpup8N3rCpLe70TAVSxjUNC8aHNe0zM7W w21wRP/ybLHQFIPIYhivB052NLiwuCbuS8WJWMUL0kmLFxnBUgnYYTULGSTpgpIKQq 41eFDcWACXrVWF4+8+eOkjOhwkLuky6qvnb0YbFdXhfN7nevO2w+ucSUCeHcZxUlnB 0bAhetmQAojQf6eX3GaP8nzLRbOB9UMbjQZtSeFJkRE+tQNwsuKTJW8AuwD6/1VUUe jgjlu2PHq5MgSzafZIPjwYNzS/1hqxr2n0Mkw21vyTLExW469Tmk19CBJlkbgIxP3G VgOHs2qwtz+PQ== Received: from [192.168.1.35] (ip68-107-18-54.sd.sd.cox.net [68.107.18.54]) by mr85p00im-hyfv06011401.me.com (Postfix) with ESMTPSA id 63A42D2040E for ; Wed, 2 Dec 2020 20:27:27 +0000 (UTC) Date: Wed, 2 Dec 2020 12:27:16 -0800 From: guyren@icloud.com To: PG-General Mailing List Message-ID: <756bd845-ebe1-4c45-88e8-0ab44bbc02b7@Spark> References: Subject: Is the Halloween problem an issue in Postgres X-Readdle-Message-ID: 756bd845-ebe1-4c45-88e8-0ab44bbc02b7@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5fc7f8ad_19495cff_c23" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-02_12:2020-11-30,2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=6 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=464 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2012020122 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5fc7f8ad_19495cff_c23 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The Halloween problem is that it is a challenge for the database if you=E2= =80=99re updating a field that is also in the WHERE clause of the same qu= ery. I just saw a presentation from someone about how in SQL Server he recomme= nded writing changes to a temp table and then writing them to the table a= s being much more efficient. Does Postgres handle this problem efficiently, or should we follow a simi= lar strategy=3F --5fc7f8ad_19495cff_c23 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
The Halloween problem is that it is a challenge for= the database if you=E2=80=99re updating a field that is also in the WHER= E clause of the same query.

I just saw a presentation from someone about how in SQL Server he recomme= nded writing changes to a temp table and then writing them to the table a= s being much more efficient.

Does Postgres handle this problem efficiently, or should we follow a simi= lar strategy=3F
--5fc7f8ad_19495cff_c23--