score:2
in my experience the overhead is minimal, provided that the person writing the queries knows what he/she is doing, and take the usual precautions to ensure the generated queries are optimal, that the necessary indexes are in place etc etc. in other words, the database impact should be the same; there is a minimal but usually negligible overhead on the app side.
that said... there is one exception to this; if a single query generates multiple aggregates the l2s provider translates it to a large query with one sub-query per aggregate. for a large table this can have a significant i/o impact as the db i/o cost for the query grows by magnitudes for each new aggregate in the query.
the workaround for that is of course to move the aggregates to stored proc or view. matt warren has some sample code for an alternative query provider that translate that kind of queries in a more efficient way.
resources:
https://connect.microsoft.com/visualstudio/feedback/viewfeedback.aspx?feedbackid=334211
http://blogs.msdn.com/mattwar/archive/2008/07/08/linq-building-an-iqueryable-provider-part-x.aspx
score:2
thanks stu. bottom line seems to be that linq to sql probably doesn't have a significant database performance overhead with the newer versions if you are able to use a compiled select, and the slower functions of updating are likely to be faster unless you have a really sharp expert doing most of the coding.
Source: stackoverflow.com
Related Query
- How much database performance overhead when using LINQ?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- How to reuse a linq expression for 'Where' when using multiple source tables
- how to fetch data from database using linq query for relationship 1:N and N:N (between 3 entity) in asp.net mvc EF code first?
- How to reformat Datetime when retrieving it from database using linq
- How to handle nulls in LINQ when using Min or Max?
- How to avoid Query Plan re-compilation when using IEnumerable.Contains in Entity Framework LINQ queries?
- Why does C# compiler create private DisplayClass when using LINQ method Any() and how can I avoid it?
- Performance concern when using LINQ "everywhere"?
- How much overhead does 'Update Check' have for LINQ UPDATES
- How does LINQ defer execution when in a using statement
- When using a LINQ Where clause on a Dictionary, how can I return a dictionary of the same type?
- Calling a method in a linq foreach - how much overhead is there?
- Avoiding code repetition when using LINQ
- How to sum Timespan of subtraction between two datetimes in Linq when using group by?
- How much space taken when using System.Linq?
- How to check if XML contains element when using LINQ to XML?
- how delete more than one record from database using Linq in asp.net mvc
- How can I write the following code more elegantly using LINQ query syntax?
- How to construct IQueryable query using Linq when I just need count without reading all documents in Document-Db database?
- How to add TimeSpans together using LINQ when in a Dictionary collection
- How can I code an outer join using LINQ and EF6?
- How to get the value of an XML element using Linq even when empty
- How to use expressions to build a LINQ query dynamically when using an interface to get the column name?
- How to get the key when using linq Max() method
- How to Insert a New Node Using LINQ to XML when only xml data is available?
- How does Linq to SQL perform when using List.Contain()?
- EXTREMELY Poor LINQ Query Performance When Using Skip/Take for Paging
- how to convert Database Hierarchical Data to XML using ASP.net 3.5 and LINQ
- Is a full list returned first and then filtered when using linq to sql to filter data from a database or just the filtered list?
More Query from same tag
- Convert linq date to short date
- int -> int list is not compatible with type int -> IEnumerable<'a>
- Select 50 to 100 rows from datatable
- Group by multiple columns at the same time
- GroupBy Anonymous Type Differences - VB.net vs C#
- Limit results from linq results .NET
- find duplicate objects within a list of lists (using linq?)
- Left outer join linq query object reference not set to an instance of an object
- How to get records from tables in custom order of ids?
- Use variable value as field with LINQ
- Joning tables after group by on one table using T SQL/ LINQ
- Predicate Builder in MVC 3
- Fetch month and Year Inside a List using Linq
- C# Deseralize - There is an error in the XML Document (0, 0)
- Getting around lack of 'Contains' in Linq To Entities
- Obtaining the min and max of a two-dimensional array using LINQ
- In LINQ-SQL, wrap the DataContext is an using statement - pros cons
- combine two datetime to one and use it in linq
- Check duplicate GridEX rows with Linq does'nt work
- Is it possible to concat strings when grouping with Linq?
- How to add some number to XML element's value (it's concatenating instead of adding)?
- Linq filter using List<int>
- Linq union two tables where on has an extra column
- How to use both update and join in a single lambda expression
- Select across associative tables
- LINQ Contains clause - more then one value in criteria
- Get a list made up of a list of grouped items from a source list
- How alter List<int> with LINQ ForEach
- How to use a precompiled Linq query
- Mocking (moq) a GetAllAsync linq query with select