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 1kkaIx-0007fX-GP for pgsql-general@arkaria.postgresql.org; Wed, 02 Dec 2020 22:08:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkaIw-0000ss-6M for pgsql-general@arkaria.postgresql.org; Wed, 02 Dec 2020 22:08:54 +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 1kkaIu-0000s9-Qj for pgsql-general@lists.postgresql.org; Wed, 02 Dec 2020 22:08:53 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkaIq-0007Ai-OQ for pgsql-general@lists.postgresql.org; Wed, 02 Dec 2020 22:08:52 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4FC125C0190; Wed, 2 Dec 2020 17:08:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 02 Dec 2020 17:08:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=r ovfm87Wz4S/9/whvZLjrAa3DD6NR6XwmSUFa8+eiZQ=; b=E1RtOUSroI1LLmxqF hft57RRwTDn2472u7qdB8Bl+AxiW+BM1GrOGz0Fm2Wktq1HjNbKAr9LQ9UB6J0/m AT7cFPwSynJTaTdO/gdkjhHxYQfCpYQJHKRJaI7B+6JgJGyShWjSaOWHXBATW4Zl Mi1XGBAGVHJLB1TqVbiAKU8VicBcvPWVW7SM97S2MOt6H3AbaNegAXdKKrds254S m3jibQGvdVq5AKEUJE2xhgbWqotINJC/+HxUzLgGIcx7hvSuzQukLnEKbthr/TFZ 6w3SkkzAh51b0V6qadTMG/aFj2uMXUkeAu/Phi5yb2ktVJ/zlA2C9lhGSQauG6zj E3qmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=rovfm87Wz4S/9/whvZLjrAa3DD6NR6XwmSUFa8+ei ZQ=; b=JZ1FpFxK8Nd8HJ83B+D48g/cxklSBNmFGlgW3FuKapBY3Tf37ZyLM3mio fnbTsupQcbZzYhDEg+TQhH2U/oErmenYGvFsERUGkWN+4C9fppRA6BSz6oemb1E3 UT6qXD7OfX84cJXQ+qlnjewvgIa7F9Tw5cfSz1EUFT0N9CGgMYJaGXeXcy8LthwN NzIdZrlhYUtk86TKYVvPncOuMrQDfIQJLT13Nl0Ms4Cv5f22LygMH6x8qIY74VXT MMHKQBKADVcUFF4HyQ8w2CMo/Cq0L/I3My3EW3NqEwiSfkK4yrbusIBYPXP+/ayu vwjPuRD8d4dxpv1vxputJ/vCGdSeQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeigedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeelffekie eitdehveejkeekteffjeelffefhfeiffeugeehgedtfeduteelheehveenucffohhmrghi nhepshhqlhhshhgrtghkrdgtohhmnecukfhppedujedvrdehkedrvddvrddvtdehnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghn rdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from ranger.suse (unknown [172.58.22.205]) by mail.messagingengine.com (Postfix) with ESMTPA id 3731A24005C; Wed, 2 Dec 2020 17:08:45 -0500 (EST) Subject: Re: Is the Halloween problem an issue in Postgres To: Thomas Kellerer , pgsql-general@lists.postgresql.org References: <756bd845-ebe1-4c45-88e8-0ab44bbc02b7@Spark> <5f7e3d0e-52da-c5e4-72d6-edcff340d710@gmx.net> From: Adrian Klaver Message-ID: <869172f6-9114-e759-79ba-eb17f1c5082c@aklaver.com> Date: Wed, 2 Dec 2020 14:08:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <5f7e3d0e-52da-c5e4-72d6-edcff340d710@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/2/20 2:02 PM, Thomas Kellerer wrote: > guyren@icloud.com schrieb am 02.12.2020 um 21:27: >> The Halloween problem is that it is a challenge for the database if >> you’re updating a field that is also in the WHERE clause of the same >> query. >> >> I just saw a presentation from someone about how in SQL Server he >> recommended writing changes to a temp table and then writing them to >> the table as being much more efficient. > > It sounds strange to me, that this _is_ actually a problem. > > Why exactly is that a problem in SQL Server? Yeah that was a new one to me. A quick search found: https://www.sqlshack.com/the-halloween-problem-in-sql-server-and-suggested-solutions/ > And what are the consequences if you do it nevertheless. > > > -- Adrian Klaver adrian.klaver@aklaver.com