Can somebody tell me, why does Linq to Entities translate many to 1 relationships to left outer join
instead of inner join
? Because there's referential constraint on DB itself that ensures there's a record in the right table, so inner join
should be used instead (and it would work much faster)
If relation was many to 0..1 left outer join
would be correct.
Question
Is it possible to write LINQ in a way so it will translate to inner join
rather than left outer join
. It would speed query execution a lot... I haven't used eSQL before, but would it be wise to use it in this case? Would it solve my problem?
Edit
I updated my tags to include technology I'm using in the background:
- Entity Framework V1
- Devart dotConnect for Mysql
- MySql database
If someone could test if the same is true on Microsoft SQL server it would also give me some insight if this is Devart's issue or it's a general L2EF functionality... But I suspect EF is the culprit here.