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 madeto the function.
and you look at the log file and separate query plans from there.
proposed changes just force storing query plans to the log file.
marcos sicat <marcos.sicat@atlasifs.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.