Compiled queries are crucial if you need a performing app using entity framework or any other linq provider.
Don't mess compiled query up with Expression.Compile. Executing queries using compiled expressions is even slower than just running expressions.
A compiled query is an expression already translated into sql, which can be archived using e.g. Entity Frameworks CompileQuery class.

Rough tests I made showed that even the most simple "get by id" statement executes at least 5 times faster if its precompiled.

Last edited Oct 22, 2010 at 10:33 AM by Ymris, version 2


No comments yet.