Home > Net >  Query postgresql database in c #, and more than 30 seconds to check
Query postgresql database in c #, and more than 30 seconds to check

Time:10-19

Such as topic, if I put SQL statements directly in the database, perform more than 1 minute, but can be found out value, but on the c # program you will be prompted after more than 30 "is not the object reference to an instance of an object", is found out the results of the empty, I probably guess, of what may be a connection time limit and so on, so I through the baidu, modified the configuration files, as follows:


But, completely useless, more than 30 seconds are still the wrong, have bosses know what to do?
I use the postgresql database

CodePudding user response:

Look at your connection string

CodePudding user response:

reference 1st floor jinkuang45 response:
take a look at your connection string

CodePudding user response:

reference 1st floor jinkuang45 response:
take a look at your connection string


This is the way to connect

CodePudding user response:

CodePudding user response:

The query timeout
Can consider from the Angle of two optimized
1. The table structure, improve the efficiency of query
2. Adjust the data display, partial query time
  •  Tags:  
  • C#
  • Related