In the past when working with databases I've found it necessary to do low-level tweaks to the query, for example providing hints to the optimiser that it should use a particular index or join order. We are currently considering rewriting our data layer using Entity Framework; is it the case that using EF prevents this sort of low-level optimisation?
In answer to this question it was suggested that reworking the LINQ query was the best way of ensuring that the query against the underlying database was efficient, but surely this is contrary to the stated goal of the Entity Framework that it should separate physical-layer concerns from the code, which should only deal with the conceptual layer.
One option is to use a view. Another option is apparently to tweak the defining query for an entity type. However, both these approaches operate per-entity-type, and optimisation tweaks often need to be applied for only some uses of a table, not every use of a table. I'm worried that I'm going to end up having to introduce pseudo-entities into the conceptual layer in order to take advantage of this, again detracting from the separation of conceptual and physical layers.