Multiple insert statements with protocol 3

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 29 Jul 2010 13:17

We've released the 4.95.152 build which contains the implementation of the 'Unprepared Execute' connection string parameter.

The new build can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version) or from Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/
For more information on improvements and fixes available in the 4.95.152 version, please refer to
http://www.devart.com/forums/viewtopic.php?t=18591

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Wed 04 Aug 2010 00:29

In Entity Framework v4 using dotConnect for Postgres 4.95.152 build why do I still have to set PgSqlEntityProviderServices.UnpreparedCommandExecution property to true in code when I have it set to true in the connection string. I thought having it set on the connection string would eliminate using the Static Method within code to set it.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 04 Aug 2010 10:54

Thank you for your report, we've reproduced the issue. The 'Unprepared Execute' connection string parameter affects PgSqlCommands only if the PgSqlConnection object is created directly. I.e., the following code creates a PgSqlCommand object that will be executed unprepared:

Code: Select all

PgSqlConnection connection = new PgSqlConnection(); 
connection.ConnectionString = connectionString; 
connection.Open(); 
DbCommand command = connection.CreateCommand();
As for connections created using the DbProviderFactory component, we will investigate the problem and inform you about the results here.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Fri 24 Sep 2010 22:03

[Devart]
As for connections created using the DbProviderFactory component, we will investigate the problem and inform you about the results here.

Have the issue with DbProviderFactory and the 'Unprepared Execute' been resolved yet. I am using dotConnect for Postgres 5.0 Beta, and I not longer have to set the Static Method, but the performance is pretty bad when I have the 'Unprepared Execute' connection string parameter set to true.

Thanks,

Charlie J.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 28 Sep 2010 10:15

Beta 5.0.10 does not include the fix for this issue, we will inform you as soon as the corresponding build is released. Probably, you are using the text Protocol 2.0 which uses unprepared execution by default.

As for the performance, could you please describe the situations when it is bad?

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Tue 28 Sep 2010 14:59

It is bad when I use Procotol=3 and Unprepared Execution = true. I am using the DBFactoryProvider defined in my machine.config

Thanks,

Charlie J.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 29 Sep 2010 13:16

Could you please describe these situations in more details? I will send you a test project in a letter, please check that it was not blocked by your mail filter. Please try running the sample and tell us what should be changed in it to reproduce the problem with a low performance. The table used in the sample is defined as
CREATE TABLE fetchtest
(
id bigint,
f_char character varying(1)
)

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Wed 29 Sep 2010 18:59

I have reported this problem before and it was fixed. Now it is back when I use protocol 3, Unprepared Execute = true, and DBProviderFactory. You can email the test project to [email protected]

Thanks,

Charlie J.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 30 Sep 2010 12:40

I've sent the sample to the address specified.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Thu 07 Oct 2010 23:59

When I run the sample that you sent me with Protocol=Ver20, both Prepared and Unprepared took about 4 seconds. When I run the sample with Protocol=Ver30, both Prepared and Unprepared took about 16 seconds. I am using Postgres 8.4.1. Protocol=2 seem to be 4x faster than Protocol=3. So this is back to the orginal problem on this thread.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 08 Oct 2010 16:33

We have fixed the problem with Unprepared Execute for connections created using DbProviderFactory. The fix will be available in the nearest build, which we plan to release next week.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Fri 08 Oct 2010 16:53

Great. Thanks. But will this also fix the performance problem with Protocol 3 being alot slower than Protocol 2? It is 4x - 5x times slower than Protocol 2.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 11 Oct 2010 12:08

The performance problem is caused by the fact that by default Protocol 3 prepares commands before execution. When this preparation is disabled, the performance of Protocol 3 is approximately the same as the one of Protocol 2.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Mon 11 Oct 2010 14:39

Ok. I understand. Thanks. So the fixed you mention that will be ready this week, will fix the performance problem for using DBProviderFactory.

[Devart]
We have fixed the problem with Unprepared Execute for connections created using DbProviderFactory. The fix will be available in the nearest build, which we plan to release next week.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 14 Oct 2010 15:43

We have released the new 4.95.180 build of dotConnect for PostgreSQL. You can download it from
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version only) or from Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/

For the detailed information about the improvements and fixes available in dotConnect for PostgreSQL 4.95.180, please refer to
http://www.devart.com/forums/viewtopic.php?t=19239

Post Reply