Too long for second part any way, we will just continue , The result are
Query “Select * from trn_mr”
Plain SQL from SSMS
Total Records : 439351
Elapsed time (in sec) : 00:00:13
Insight.Database
using openwithtransaction method
initial running
Elapsed time (in sec) : 9.2635298
Total Records : 439351
subsequent running
Elapsed time (in sec) : 7.8354481
Total Records : 439351
using open method
initial running
Elapsed time (in sec) : 13.8457919
Total Records : 439351subsequent running
Elapsed time (in sec) : 8.1954688
Total Records : 439351
Dapper
Initial running
Elapsed time (in sec) : 14.577856
Total Records : 439351subsequent running
Elapsed time (in sec) : 5.2883025
Total Records : 439351
using transactionscope
Initial running
Elapsed time (in sec) : 10.0425744
Total Records : 439351subsequent running
Elapsed time (in sec) : 5.1212929
Total Records : 439351
NPoco
As dynamic resultset
initial running
Elapsed time (in sec) : 22.2962753
Total Records : 439351subsequent running
Elapsed time (in sec) : 15.7108986
Total Records : 439351
using gettransaction method
initial running
Elapsed time (in sec) : 16.7779596
Total Records : 439351subsequent running
Elapsed time (in sec) : 15.9629131
Total Records : 439351
using class object
Initial running
Elapsed time (in sec) : 5.3373053
Total Records : 439351
subsequent running
Elapsed time (in sec) : 5.3253046
Total Records : 439351
Overall Insight.Database performance is much more consistent.
While Dapper is Ok , but when used with transaction scope it is lightning speed.
The same applicable for NPoco . It performs better if associated with a class and beats itself if used in association with gettransaction method.
so for now
that’s all folks .