Re: Postgres 17.4 is much slower than Postgres 15.12 using RECURSIVE

From: marcos sicat <marcos(dot)sicat(at)atlasifs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres 17.4 is much slower than Postgres 15.12 using RECURSIVE
Date: 2025-04-28 21:53:26
Message-ID: MW5PR84MB22279A9C3D3990FAC0806679F2812@MW5PR84MB2227.NAMPRD84.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks, Tom.

After you made your recommendation, the result returned much quicker at 2.62 seconds, but v15 is still faster at 1.82 seconds. No modification was made to the function.

[image.png]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Monday, April 28, 2025 at 9:59 AM
To: marcos sicat <marcos(dot)sicat(at)atlasifs(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres 17.4 is much slower than Postgres 15.12 using RECURSIVE

marcos sicat <marcos(dot)sicat(at)atlasifs(dot)com> writes:
> The function is the same between v15 and v17. Is there a subtle difference in performance for nested subqueries in v17?

Your next step should be to compare the plans for the function's
query. The auto_explain or pg_stat_statements extensions could
be used to check that in-situ, if manually EXPLAINing that query
doesn't yield insight.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zane Duffield 2025-04-29 00:09:40 Re: BUG #18897: Logical replication conflict after using pg_createsubscriber under heavy load
Previous Message Tom Lane 2025-04-28 13:59:17 Re: Postgres 17.4 is much slower than Postgres 15.12 using RECURSIVE