Why is it that the NPGSQL .NET Data Provider is slow when compared with the ODBC Provider? I have not tried NPGSQL 2.0 but I did worked with NPGSQL 1.0. It was very slow.
What are your exp开发者_StackOverflow中文版eriences with NPGSQL 2.0?
Have had no problems with 2.0.1 and no noticeable difference in speed as opposed to ODBC (I heard Npgsql 1.0 wasnt great but havent used it). Have been using it with ADO .Net in Windows Forms and WPF apps no problem. One reccomendation when doing so: it is more robust to adopt the 'disconnected' paradigm used by ADO which is: Open a connection, do something, close a connection, rather than trying to use a single open connection for the lifetime of your app..
Also I find better to use this page than the pgFoundry one: http://npgsql.projects.postgresql.org/
i have tried with npgsql 2.0, and still i have no changes in performance. it works very very slow. the solution i am using is without ado.net. i am using executereader and then parse this data into an object. ... i thing that npgsql doesn't parse very well text columns with large amount of data, because in some cases i have noticed that the performance is good, when the result isn't too large and the data doesn't contain large text columns.
It's worth noting that a significant change in this regard was made with 2.0beta3 which was released on 2008-04-07. The change in approach was significant enough that it was necessary to add a backwards-compatibility flag in the connectionstring as some code depended on side-effects of the old approach. This also means that the difference between the two is documented.
精彩评论