I have a couple of small apps im writing using VB.net 2008 and PSQL v10 I have two seperate issues with the apps, the first being the first time it access the DB it takes ~10 seconds to complete the transaction. every transaction after this is instant, or close enough to not notice a slowdown in the program. Its not causing huge issues but i would like to be able to fix it.
The second is related (I think) where i get the ODBC Timeout error when I try to access the DB . I am trying to pull out one number from the DB so its not a huge data pull. The correlation between the two is only the command string im using.
1st Problem string = "SELECT TOP 1 testno FROM vacpumps.header ORDER BY testno DESC"
2nd Problem = "Select top 1 * from MONITOR.events WHERE tag_no = " + CStr(tag.TagNo) + " ORDER BY event_no DESC"
now these databases have been around for a good couple of years, and using the old system im changing from where they were accessed through the ActiveX component in VB6 had no such slowdown issues.
as stated im using the managed provider using psqlcommand to set the command and reader to cycle through the results. I have no such issues when im searching not using the TOP command, and the first command works a treat after the first instance. and for reference the 1st DB is only 100mb or so in size and the 2nd is 3GB