Feb 02, 2012 02:39 PM|kedarrkulkarni|LINK
actually there is SqlConnection.RetrieveStatistics Method available for
SqlConnection which does this job...
but of course...... since you are using oracle database.... you cannot simply use it...
however, you might want to take a look at how it works...
I havent tried this for Oracle... but looking at OracleConenction class, it seems simillar method is missing
I suppose you would have to use your approch of time recording in that case.... about the latency factor, we cannot exactly say that the latency would remain uniform for every query fired from application.... since, the latency could be depend on the current
n/w load etc.
moreover, connection pool would play a role in how quicker you get the response in App... as in case of using pooled connections, you might save some time in comparison with the instances where new connection need to be initialised...
even after given all these things.... if the execution time of your queries is significant (more) then all other delay factors caused by application would not affect result much... and you could reasonably use time recording approch
hope this helps...