PostgreSQL performance - CAPIPreparedStatement
Posted: 11.01.2014, 10:59
I migrated from Zeos 7.0.3 to 7.1.2. And PostgreSQL performance highly reduced in some parts of code. One query which executes several times per minute:
on 7.0.3 takes 150 milliseconds
on 7.1.2 takes 1000 milliseconds
Đ•xamining and tracing code, I found some dirty solution:
file "src/dbc/ZDbcPostgreSql.pas", function TZPostgreSQLConnection.CreatePreparedStatement:
CAPIPreparedStatement works very slow in my case, so I changed it to ClassicPreparedStatement.
In this regard, I have two questions:
1. Is this a bug?
2. If this is not a bug - can I perform such patch as described above? Will this affect other functions or stability?
on 7.0.3 takes 150 milliseconds
on 7.1.2 takes 1000 milliseconds
Đ•xamining and tracing code, I found some dirty solution:
file "src/dbc/ZDbcPostgreSql.pas", function TZPostgreSQLConnection.CreatePreparedStatement:
Code: Select all
if GetServerMajorVersion >= 8 then
//Original code: Result := TZPostgreSQLCAPIPreparedStatement.Create(GetPlainDriver, Self, SQL, Info)
Result := TZPostgreSQLClassicPreparedStatement.Create(GetPlainDriver, Self, SQL, Info)
else
Result := TZPostgreSQLClassicPreparedStatement.Create(GetPlainDriver, Self, SQL, Info);
In this regard, I have two questions:
1. Is this a bug?
2. If this is not a bug - can I perform such patch as described above? Will this affect other functions or stability?