This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When I write the following LINQ query Lightspeed will query the People table then it will run a individual query for each person on the PersonContactPhone and PersonContactGeneral which is really inefficient. I can manually create the query with LINQ Join statements but I would expect Lightspeed to identity that there needs to be a SQL Join statement (EF does this). This there something I'm missing here?
Below are the resulting SQL queries
The following queries is executed once for every Person:
|
|
|
Hi, You could eager load have a look at http://www.mindscapehq.com/documentation/lightspeed/Performance-and-Tuning/Controlling-How-Entities-Load Cheers, Sean |
|
|
Aggregates is what I've started doing. I have a very complex model and 3 developers working on the software so creating aggregates for all of these types of queries could become unruly. I've been using EF for several years but made the decision to go to Lightspeed for this new project and I was surprised when I discovered how it compiles the Linq query. Yesterday I built a tool that reads/writes the .lsmodel XML to manage the aggregates. This tool allows the developers to view/add/edit/delete the aggregates and manage which relationships they apply to. |
|