Hopefully, I’ve convinced you that write caching or batch updating can be a huge performance win for applications that must perform very frequent updates to a database, such as in a logging scenario. Figure 12 (the last figure, I promise!) shows a summary of the 6 scenarios and how the various metrics compare.
Figure 12: The Last Figure (with summary data from all tests)
Test |
ASP.NET Requests/Sec |
Sql Batch Requests/sec |
TTLB (ms) |
NoCache RemoteDB |
9.14 |
91.86 |
103 |
NoCache LocalDB |
84.15 |
420.74 |
7 |
ReadCache RemoteDB |
13.85 |
84.54 |
67.43 |
ReadCache LocalDB |
95.36 |
286.49 |
5.66 |
AllCache RemoteDB |
113.1 |
1.24 |
3.95 |
AllCache LocalDB |
118.52 |
0.6 |
3.52 |
In the course of finishing this article, I’ve become more and more interested in the MSMQ alternative. Hopefully at some point I’ll have time to investigate it, and probably write a follow-up article (or at least blog about it). However, for now, these results speak for themselves.