Re: The performance issues caused by upgrading PostgreSQL to version 16.3. - Mailing list pgsql-general

From Adrian Klaver
Subject Re: The performance issues caused by upgrading PostgreSQL to version 16.3.
Date
Msg-id ead69f8e-6a9f-46a5-80cd-da4e12705406@aklaver.com
Whole thread Raw
In response to The performance issues caused by upgrading PostgreSQL to version 16.3.  (馬 騰飛 <ma-tengfei@nec.cn>)
List pgsql-general
On 2/16/25 23:55, 馬 騰飛 wrote:
> Dear PostgreSQL Community,
> 
> I hope this message finds you well. I am reaching out to seek your technical assistance regarding a performance issue
weencountered after upgrading our PostgreSQL version from 12.19 to 16.3.
 
> We have noticed a significant performance problem with a specific SQL query on one of our application screens.
> Interestingly, when we isolate the problematic SQL statement and replace its parameters with actual values, it
executesin just a few seconds in pgAdmin.
 
> However, when we run the same SQL query through our application using Npgsql, it takes over ten minutes to complete.
> We are using NpgsqlCommand.ExecuteReader to execute the SQL query, and the parameters are set using
NpgsqlCommand.Parameters.Add.
> The main table involved in this query contains approximately 800,000 records.
> We believe that the SQL statement itself does not have performance issues, but there may be problems related to how
theSQL is executed in the application or how the parameters are set.
 
> However, we are unable to pinpoint the exact cause of the performance degradation.
> Could you please provide us with some possible reasons or suggestions for improvement? Your insights would be greatly
appreciated.

This is going to need more information:

1) Was the upgrade done on the same machine or across machines?
If across machines how are they different?

2) The table definition.

3) The query text.

4) The Npgsql code.


> Thank you for your assistance, and I look forward to your response.
> 
> Best regards,
> Ma
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Doron Tsur
Date:
Subject: Re: The performance issues caused by upgrading PostgreSQL to version 16.3.
Next
From: Jan Behrens
Date:
Subject: Calling set-returning functions in a non-set-expecting context