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.96) (envelope-from ) id 1vrpbz-008PkA-3B for pgsql-performance@arkaria.postgresql.org; Mon, 16 Feb 2026 03:49:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vrpbx-003Nu9-2V for pgsql-performance@arkaria.postgresql.org; Mon, 16 Feb 2026 03:49:25 +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.96) (envelope-from ) id 1vrpbx-003Nu1-18 for pgsql-performance@lists.postgresql.org; Mon, 16 Feb 2026 03:49:25 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vrpbt-00000000xAQ-3pKY for pgsql-performance@postgresql.org; Mon, 16 Feb 2026 03:49:24 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-8230c33f477so1265345b3a.2 for ; Sun, 15 Feb 2026 19:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softimp-com-au.20230601.gappssmtp.com; s=20230601; t=1771213758; x=1771818558; darn=postgresql.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=3gyx8s7siT8LpIO9OgEdc6A7wrDLn/koyt5uGOEq+Rw=; b=TKnLFlFNfDLGNgJB60GDC2Ld7dhZxyCOXigacjuCRF2IQdzG78QqPRCLMV1BjWKYLI ShGkOKK91attpwG7IChYyvyCjloyDd1g3iC6gjfgnXcA4HW2wII2ISyTKYtBkJGroU5Y O8tvAULAFzyutjjfqVMp2lifRTpsl/AkvpWPvuZYrwHQIfrobl9IQY612Q01c3ZNduK6 fnyOX1Vqj6EehsJPX3Onfh6jRworFrF0vUJJsfG5IL4GKnn+vBE/lAjQXsmWrY3X8Pme 3nDiOqWGDZQkeCsCOjE7qhk169ybft8bsugwD9FJJqMgncX0q4UhqQ2WOFUd2IVZ0dmU Lyxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771213758; x=1771818558; h=to:date:message-id:subject:mime-version:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3gyx8s7siT8LpIO9OgEdc6A7wrDLn/koyt5uGOEq+Rw=; b=AaILjaYbHb0IDfNjflEZvJ/R52179IKhOw4CZvzYkbvy5aYNFwJH0qb/qpp4qcGTdF X2wIFgqx1ZQt87h+RX1bvv/FtCN8xbp3ILT5NyuCk9sqgRP0nXEtiOFHxUQ+c6u7Ye+K ecRprg5J103DCjXzfHVdLnhNoY8Th9QakK03Idd1osjDmH0XNWbGPKbrufKFL9JaqUdd m+0Iz3RZl8vd/PVI/Ez3NKJNIWtQp9Rzyo/HuyV+7R+YJYhCiyyFQbsWDR6OWXQW863q 9zlA9tW7+WY3vPaJpJAuB7EzVO4Rvb5gaFcUKciXevYJL/+iCARe3T2yVAMQb3NifaL7 YOPg== X-Gm-Message-State: AOJu0YzIXN9yUxAYuFFYWewQzPWV8tVQ8m8wv/PLkmea5XIw4dsoe3Fp 54fbX3LEZ/TK6PXRExLKuAHKYvyvARsY8te9Ova+1n5LduvjhXthMaclpftWsaaUyEFx3OQ458j BeJd5 X-Gm-Gg: AZuq6aKpxTF6Mf4TxPUCaDT7lBICo8saTho2gq1iN1UvSAZA6YNc5RIvnli98lcNKqr U//TWrLXQYdln8XFJLDW83qctKwH3QELeBJqpsq/7PbTffYrHvaxgRKs1A3EBVwVcdAZ4RyEcov D/KIwFlohiy5Mp5mzm8f/DDfP3U9+g6jYnq2vyLSIGRqTpgOojahNisJFYum3wcUgEHzyijEnFx tsJntzdMrLXOlatbS/MLLb/uIsCFi8bbvqNoWZDaEYZjIqr1nmk848GgikLzBoqBusS4KYkf4ad M3Gtu2piUhoEDlfW00djaUFh71wycW8rD+yJZVBbJi0Z3hJz0R2zOA6x03H0Xs4LWaosxXsDBmA KTBTf+OjcdjrEnnj63c/p9+A/nBVkJOtsGgjyPkSK3KX5bIBEE05lEBT9L7LQ8mqXIXJVJ7h4Au caD6xYNR14hnnl9FcAxlpdtoRaLoAMfY/Om+kPUIz4rjfDmT2fRjWew0RJWfY9KA== X-Received: by 2002:a05:6a21:7009:b0:38e:91a7:6352 with SMTP id adf61e73a8af0-3946c93b130mr9533838637.66.1771213757414; Sun, 15 Feb 2026 19:49:17 -0800 (PST) Received: from smtpclient.apple ([103.22.145.60]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c6e53328f3asm5444005a12.30.2026.02.15.19.49.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Feb 2026 19:49:16 -0800 (PST) From: Clive Boughton Content-Type: multipart/alternative; boundary="Apple-Mail=_F540079D-74B1-4839-A2B6-9A8D2CF7C639" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: A serious change in performance between PG 15 and PG 16, 17, 18. Message-Id: <5A68A5FD-3CD2-4863-B274-51804235BE3C@softimp.com.au> Date: Mon, 16 Feb 2026 14:49:02 +1100 To: pgsql-performance@postgresql.org X-Mailer: Apple Mail (2.3826.700.81.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_F540079D-74B1-4839-A2B6-9A8D2CF7C639 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii To whom it may concern, The system I'm referring to has been built by my company beginning in = 2019/2020 with PG 10.2. The SQL functionality and related tables contained within the PG DB has = changed little since initial delivery. There a very few complex forms of SQL used and the tables are quite = simple - the largest being ~400,000 rows based directly on ~50,000 = instances of the primary key. The functions do not update anything in this 'large' table (from which = data is only read) but do produce several significantly smaller tables - = the largest being ~ 40 columns x 50-80 rows about 80% of which are fixed = point numbers (6 decimal places). Initially (in 2020 before an indexing was added) the time to produce and = output the overall result was 30-60 minutes. After adding quite basic = indexing, that time was reduced to 1 or 2 minutes. =20 PG 10.2 remained in place until 2023 when the DB was upgraded to PG 15.2 = with no problems. In fact performance increased. When I recently upgraded to PG 18.1 (without any changes to the DB = functions or tables, or indexing) it took 7-10 hours to produce the same = result - a 300-600 times decrease in performance. My first step was to reduce the jump in versioning of PG from 15 to 18 = down to 15 - 16. This action produced the same very poor performance = result as when using PG 18.1 To try and save time I employed the help of Claude Pro (an excellent AI = tool for software development). After implementing all sorts of = suggestions (indexing, configuring etc.) and undertaking all sorts of = checks (using available PG functions), the conclusion is that some = significant regression was introduced in PG 16, and hasn't been removed = in (at least) PG 18 (I ddn't try PG 17). Of course, I do understand = that bringing Claude Pro into the fray may have its own issues, but = Claude's suggestions and explanations do make sense and at the very = least may help a PG expert to more easily hone in on the path to take to = fix the issue. Sticking with PG 15 in the short term is fine for us. However, the = current performance of PG 16 - PG 18 is totally unacceptable in terms of = expectations. As an aside we did increase the number of elements by 30% within the = largest table (mentioned above). So that instead of ~400,000 rows there = were ~550,000 rows to read from. The number of instances of the primary = key was not changed. This action (for PG 15) only added an extra 20-30 seconds to the = production of the result - more or less as expected. Although the same = actions were performed on PG 18, after several hours we simply killed = the process. BTW, the 'tests' I did were carried out in both a MacOS (Sequoia) and a = Linux (Rocky Linux 9.6) environment. For reasons of security I can't provide all the SQL code, but I can (if = it is necessary) provide an outline of what the code does. Regards. Clive. Dr Clive Boughton Software Improvements Street address: 97 Bankers Road, NSW 2621 Australia Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195 --Apple-Mail=_F540079D-74B1-4839-A2B6-9A8D2CF7C639 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii To whom it may = concern,

The system I'm referring to has been built = by my company beginning in 2019/2020 with PG = 10.2.

The SQL functionality and related tables = contained within the PG DB has changed little since initial = delivery.
There a very few complex forms of SQL used and the = tables are quite simple - the largest being ~400,000 rows based directly = on ~50,000 instances of the primary key.
The functions do not = update anything in this 'large' table (from which data is only = read) but do produce several significantly smaller tables - the = largest being ~ 40 columns x 50-80 rows about 80% of which are fixed = point numbers (6 decimal places).
Initially (in 2020 before an = indexing was added) the time to produce and output the overall result = was 30-60 minutes.  After adding quite basic indexing, that time = was reduced to 1 or 2 minutes.
 
PG 10.2 = remained in place until 2023 when the DB was upgraded to PG 15.2 with no = problems. In fact performance increased.

When I = recently upgraded to PG 18.1 (without any changes to the DB functions or = tables, or indexing) it took 7-10 hours to produce the same result - a = 300-600 times decrease in = performance.

My first step was to reduce = the jump in versioning of PG from 15 to 18 down to 15 - 16.  This = action produced the same very poor performance result as when using PG = 18.1

To try and save time I employed the help = of Claude Pro (an excellent AI tool for software development). =  After implementing all sorts of suggestions (indexing, configuring = etc.) and undertaking all sorts of checks (using available PG = functions), the conclusion is that some significant regression was = introduced in PG 16, and hasn't been removed in (at least) PG 18 (I = ddn't try PG 17).  Of course, I do understand that bringing Claude = Pro into the fray may have its own issues, but Claude's suggestions and = explanations do make sense and at the very least may help a PG expert to = more easily hone in on the path to take to fix the = issue.

Sticking with PG 15 in the short term is = fine for us.  However, the current performance of PG 16 - PG 18 is = totally unacceptable in terms of = expectations.

As an aside we did increase the = number of elements by 30% within the largest table (mentioned above). =  So that instead of ~400,000 rows there were ~550,000 rows to read = from.  The number of instances of the primary key was not = changed.
This action (for PG 15) only added an extra 20-30 = seconds to the production of the result - more or less as expected. =  Although the same actions were performed on PG 18, after several = hours we simply killed the process.

BTW, the = 'tests' I did were carried out in both a MacOS (Sequoia) and a Linux = (Rocky Linux 9.6) environment.

For reasons of = security I can't provide all the SQL code, but I can (if it is = necessary) provide an outline of what the code = does.

Regards.

Clive.

Dr Clive Boughton

Software = Improvements

Street address:
97 Bankers Road, NSW = 2621
Australia

Mobile Phone: +61 (0)410 632 055
Telephone: = +61 (0)2 6230 3195




= --Apple-Mail=_F540079D-74B1-4839-A2B6-9A8D2CF7C639--