Because you have only got timings to the very start of the batch. If you consume the data too, the times will probably line up:
using(var dr = comm.ExecuteReader()) {
do {
while(dr.Read()) {}
} while (dr.NextResult());
}
Incidentally, there are also a few SET
options that can change the performance of some queries - not sure that should apply here, but it can significantly impact tables that have calculated+persisted values: if the SET
values aren't compatible with the settings when the column was created, it will need to re-run the calculation per row. This is especially noticeable for calculated+persisted+indexed columns if you are filtering on that column - it will have to do a table-scan (or similar) rather than an index scan / index seek.