Open connection overhead
Posted: Fri 20 Jul 2012 12:19
I have been examining timings in dbmonitor due to slowness in the app. Each time a query is run the following items appear:
Not much of an overhead but if you run 10 queries against an instance of the Entity (for example inside a using) it repeats these for each query. So, in this example, if the queries take 125ms to prepare and execute, we get:
query time: 1250ms
connection overhead: 940 - 1400ms
total: 2190 - 2650ms
Is this to do with Linq, Postgresql or the Entity? Is there any way to persist the connection so the open, execute and close are only carried out once?
Using Postgresql 8.4, dotconnect V5.80, C# visual studio 10.
Code: Select all
Open Connection (47 - 63ms)
Exeute: SET Search_Path TO public (47 - 62ms)
Close Connection (0 - 15ms)
query time: 1250ms
connection overhead: 940 - 1400ms
total: 2190 - 2650ms
Is this to do with Linq, Postgresql or the Entity? Is there any way to persist the connection so the open, execute and close are only carried out once?
Using Postgresql 8.4, dotconnect V5.80, C# visual studio 10.