NHibernate query extremely slow compared to hard coded SQL query
问题 I'm re-writing some of my old NHibernate code to be more database agnostic and use NHibernate queries rather than hard coded SELECT statements or database views. I'm stuck with one that's incredibly slow after being re-written. The SQL query is as such: SELECT r.recipeingredientid AS id, r.ingredientid, r.recipeid, r.qty, r.unit, i.conversiontype, i.unitweight, f.unittype, f.formamount, f.formunit FROM recipeingredients r INNER JOIN shoppingingredients i USING (ingredientid) LEFT JOIN