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 1pmc0x-00088u-8K for pgsql-general@arkaria.postgresql.org; Wed, 12 Apr 2023 15:04:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmc0w-000236-7F for pgsql-general@arkaria.postgresql.org; Wed, 12 Apr 2023 15:04:02 +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 1pmc0v-00021i-S7 for pgsql-general@lists.postgresql.org; Wed, 12 Apr 2023 15:04:01 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmc0q-002SZm-UD for pgsql-general@lists.postgresql.org; Wed, 12 Apr 2023 15:04:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9D58D5C0055; Wed, 12 Apr 2023 11:03:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 12 Apr 2023 11:03:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1681311834; x=1681398234; bh=5OQlpVpVVXIZP6yawctJHx9NQDdR9RlBd7l 50Xp1IL4=; b=mwTPf8GmDCO9I0qhx+scn52Z06Fr66kvj8JKWcnOp4rkzs1kQtl qbS3xNZC0OmbnOsPy93C6MICgICPzfVkgDZ9ji/c8thvJ5RfSU5MX456zxCvHC67 9JhLh/s3jBz8Yuhta0g5C0RFRzUl9I/2a7L8CaHYMyPidJj0tapcJtsXzBRpbUbm dk7Vj63kZM+mi7Tub/g4ugHbwS7RQIY5bY0qprvoqTmpX++XFoeY+7/6R8ypamBP UHHtB8H9AeM7JF8wc62Tfzoc99etU2Ah5q72N+vFjpYw8VoeWq9/y6mUuoQj9NCQ 4s8mLfTjSQuialZFmgL67bGJANBccZKeV2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1681311834; x=1681398234; bh=5OQlpVpVVXIZP6yawctJHx9NQDdR9RlBd7l 50Xp1IL4=; b=XDQdIvgbm2EmTGR49RIZAWsQseu9r7Cbee2oX81mhKi23EQFvFO o5wN/d0tGkbyvJNSRTpnizDvygS2NyUzqdL1JxSJ4g378KMIOWEP8veS8lYmZHag Y3W46HRoqyq3N5mrQX8yjztX3g0cV9YiLgjNa8Oq8oSbRq+1Hq3HZAt+OtaWyHr1 fyAHvWEuKbjU/Ct2Hhy4oLrOeagPur3IOfxlTJkIB2GTEgli26O9ObwPA6R34fNt 54rJkDB80YOp/wXpg6zJHkNmIKHznvvPTtPIXm+YSG9tNQHXzIxGRGU0fdjNyaO7 SSvcnSLJkMkw7wAhzK/JWnps3V3rPKLCpaw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekiedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefhgeevke efleffvdfgvdefffdtueejheehueeifffhfeeihfdvhffgtefgvdeugfenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdr tghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 11:03:53 -0400 (EDT) Message-ID: <813fb203-bf02-3f2b-b4c0-cdcfd5de86c9@aklaver.com> Date: Wed, 12 Apr 2023 08:03:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: Performance issue after migration from 9.4 to 15 Content-Language: en-US To: =?UTF-8?Q?Christian_Schr=c3=b6der?= , Tom Lane , David Rowley Cc: "pgsql-general@lists.postgresql.org" References: <143137.1681222135@sss.pgh.pa.us> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/11/23 07:41, Christian Schröder wrote: > Hi all, > Thanks for all your tips! > I have meanwhile run "ANALYZE" on all tables. Either that was as important as everybody tells me 😉 or it is just a coincidence (e.g., fewer other queries on the database). It is: https://www.postgresql.org/docs/current/pgupgrade.html Statistics Because optimizer statistics are not transferred by pg_upgrade, you will be instructed to run a command to regenerate that information at the end of the upgrade. You might need to set connection parameters to match your new cluster. -- Adrian Klaver adrian.klaver@aklaver.com