The headlines are that a compiled select gives us 93% of ‘to the metal’ performance, which is a excellent result considering what it is buying you. Tantalizingly updates and inserts outperform old-style ADO.NET code, and Rico promises to say more on why in a later post.
The key to the select performance improvement seems to be the use of compiled queries. Compiled queries might fit well with the repository pattern, as the repository encapsulates queries against the underlying collection that it abstracts. Of course, you can use specifications in addition to the repository. Folks who saw my presentation at DDD, know a little bit more about my suggestions there; more forthcoming in this blog soon.
I’ll review my posting on Persistent Ignorant approaches to using LINQ to SQL in light of the performance benefits of using compiled queries, once I get my hands on Beta 2. (Having just moved house the big question remains will I get broadband hooked up in time for beta2).