Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tjxDh-00FAyd-WA for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2025 09:15:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tjxDg-00EYEe-AJ for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2025 09:15:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tjxDf-00EYEW-Um for pgsql-general@lists.postgresql.org; Mon, 17 Feb 2025 09:15:15 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tjxDd-001JDd-2T for pgsql-general@lists.postgresql.org; Mon, 17 Feb 2025 09:15:15 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aaec111762bso947078266b.2 for ; Mon, 17 Feb 2025 01:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1739783712; x=1740388512; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=OJPghMjxVg+bLHMY50be6QL+j7gH4VNbPcXUjNJgzPI=; b=J3NSLaJpdjwVCSpiYP6V7shtfJdg7ZiYoU7zLCugqikOGDPyDR+1hsNAiJFs4I+25o k2gNeiMUY8jUC91xTTArSA19DqsrLq9qHOWxWe3gOQFdB8aYRFtABLXzV3u1A8MEuehB 8DTUHpF4zckbeWcpOsaY6pdd11anY+1c04+kOY9smtszaeTY65ZZcKLtkhxFakOE2izD n8ou/25Z+mURbzu8w7zbdNayQS2LqmS/jcdHIO+hUvWApJMZzu9lrNa6u+lphDkjHtv6 mywMpTpmzJtE6Os9SrR1nk8qR/U3yUPZv8tl0lVIwPj6/L/S7CkLEgccl1US0Q0WKZUN n4OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739783712; x=1740388512; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OJPghMjxVg+bLHMY50be6QL+j7gH4VNbPcXUjNJgzPI=; b=BR5hAo1uLJNZkpTVT3ILjILCzW3hF/GPRhEsJjO3cBv3lqayO87HPH8IuUWJ9QHCIg io/34W5QDoyza8ezX3FvQ+139FMLEnxIR9JM3bBcu4QVAnRZ98mgJu3i3/ngNEEd9W9J LJSaVwzWynfLeduPt9JKdzXx0PKj8g88Yr8Y3q8YBuYQh2nZ7zw2gX7y4IZhYyb/U6gK NjtR/J3DQiyCtepe6UGQIIpl+gxNh8icSMNMZiA9tFXfL1OpiDdOLC8teM0RH2y3rklW SoB26dNSIP9ny4EaLj6J/l4Rfn201he5CabNubuS2/bbuRGqSVl5zD13iU8x0w2fN5Aq Fhcw== X-Forwarded-Encrypted: i=1; AJvYcCWrN/ZtGUr/gSAP8c76+ewjbfqefrSeaHpP80dTHDUg2qtjR4qujIXvPO8bGlWDFu5rgmEFSQiGlFqcWZlP@lists.postgresql.org X-Gm-Message-State: AOJu0YzYjqt5p4J0NNugtsDljTep8OF78wDC67Bs/au+7UrMQm5qLkc+ HgmEIVGZVPCsjwvnufPTrqYZCeofjmPeCsczYiHyI9gDOevXrhH5HGVVm/oGmxcTmHwJIVTGZPM yy62XG5JjMqhDYBJQ5vD3hjsD2S4l0GWj0fFp8jJUz+LsgLld1hIs8FJYozRfZ/IUAuZFLxR7bi lD5Q== X-Gm-Gg: ASbGncv2L1vXRIccYUlt1px1qAddRl5Su2ALGmOkXoCDS/HSVNvgWWX2FrKYyMDL5O7 B2lIfX1ihj6pOVSJe/BQ4r1eiYLTgDq1x4bd0XnGCaMMlXk6s5mk0eM+hSDzQ8HTUoLvqO/N22C XZtvBAEPqk0vKq4I4GbiNUZo25P34iwaqNSVG3Zl/mMgdaORdQ90bfCLFN959yCN0X7QQh+GcRL rRqJuPuDvOQLXnQ+b0jd3nbawdLGBlMHvLbP+w7csWOi2JyA+o+IrMAuC35DLX18JF7uWWwkhsM e4dYh6THO+FxeC0V3W+Ma5wYAUsjCy3dVMw= X-Google-Smtp-Source: AGHT+IH+qsgxJopzBZxXfwe6bSltROrn0eEXkcQrNxVHbqeRyTgE0ZU/UOTzM+rNpQ4PQcBJ+/Eu9w== X-Received: by 2002:a17:906:7312:b0:ab7:ca44:feb8 with SMTP id a640c23a62f3a-abb711304d9mr972583866b.52.1739783712288; Mon, 17 Feb 2025 01:15:12 -0800 (PST) Received: from localhost.localdomain ([2001:871:5e:cd9a:7b0b:5b25:eb7e:fa23]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aba53376adcsm857492866b.95.2025.02.17.01.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 01:15:11 -0800 (PST) Message-ID: <8f12fbb4f4df89717d3d18a2b0776526f8a45eec.camel@cybertec.at> Subject: Re: The performance issues caused by upgrading PostgreSQL to version 16.3. From: Laurenz Albe To: =?UTF-8?Q?=E9=A6=AC=E3=80=80=E9=A8=B0=E9=A3=9B?= , "pgsql-general@lists.postgresql.org" Date: Mon, 17 Feb 2025 10:15:10 +0100 In-Reply-To: References: User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2025-02-17 at 07:55 +0000, =E9=A6=AC=E3=80=80=E9=A8=B0=E9=A3=9B wro= te: > I am reaching out to seek your technical assistance regarding a performan= ce > issue we encountered after upgrading our PostgreSQL version from 12.19 to= 16.3. > We have noticed a significant performance problem with a specific SQL que= ry on > one of our application screens.=20 > Interestingly, when we isolate the problematic SQL statement and replace = its > parameters with actual values, it executes in just a few seconds in pgAdm= in.=20 > However, when we run the same SQL query through our application using Npg= sql, > it takes over ten minutes to complete. I recommend using the auto_explain module to capture the plan of the statem= ent when the application executes it. You best write the fast and the slow plan to the list, in plain text. Yours, Laurenz Albe --=20 *E-Mail Disclaimer* Der Inhalt dieser E-Mail ist ausschliesslich fuer den=20 bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat= =20 dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte,=20 dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder= =20 Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich= =20 in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. *CONFIDENTIALITY NOTICE & DISCLAIMER *This message and any attachment are=20 confidential and may be privileged or otherwise protected from disclosure= =20 and solely for the use of the person(s) or entity to whom it is intended.= =20 If you have received this message in error and are not the intended=20 recipient, please notify the sender immediately and delete this message and= =20 any attachment from your system. If you are not the intended recipient, be= =20 advised that any use of this message is prohibited and may be unlawful, and= =20 you must not copy this message or attachment or disclose the contents to=20 any other person.