Last time I used Npgsql, i.e., version 1.0, it worked very slow. Is there any other alternative to Npgsql?
In order to access the PostgreSQL database system from Microsoft.NET, we're going to use the NpgSQL2 driver for ADO.NET which can be downloaded from http://npgsql.projects.postgresql.org/. When you unzip the npgsql archive, you can find the driver in the Npgsql. dll library inside the bin directory.
About. Npgsql is an open source ADO.NET Data Provider for PostgreSQL, it allows programs written in C#, Visual Basic, F# to access the PostgreSQL database server. It is implemented in 100% C# code, is free and is open source.
What is Npgsql? Npgsql is the open source . NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using . NET.
Version 1.0 is three years old. Try to use the newest one.
Npgsql is an excellent connector. Just upgrade to the new one. Make sure you take a look at the documentation it is really good. That will solve the speed issue.
You asked about an alternative, so I also have to recommend an another good connector: dotConnect for PostgreSQL. It is made by Devart. There is a simple free one as well as a fully robust pay connector. The pay one has Linq and entity framework support. http://www.devart.com/dotconnect/postgresql/
I have experience with the .NET MySQL connector. What you are describing seems to be a DNS issue. If you are using a URL in your connection string and are able to change it to an IP address, try that and see if your delay goes away.
npgsql is still the choice for .NET when connecting to PostgreSQL.
Since version 1.0, the connector has improved drastically, check out this presentation from Shay Rojansky; it is not the latest, still the boost was already quite impressive in 2018/11.
If you are upgrading from an old version, read the release notes of the latest carefully, you might break functionality in your code.
Also, I strongly recommend considering optimizing PostgreSQL as well. I work with it daily in a distributed enterprise environment, with massive workloads; it can be tuned and tweaked with a dramatic impact on the overall performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With