score:0
You can use a trial version of Ants Profiler and move linqpad code to some test console application.
Your SQL query is faster than LINQ because LINQ query generation is a expensive procedure. To have a fair comparison, try to compile the LINQ query and compare a 2nd run with pure SQL. LINQ would still be slower (LINQ does much more a than just execute the query) but the difference should be way smaller.
Source: stackoverflow.com
Related Articles
- Linqpad performance vs Sql Management Studio
- I am wondering about the state of connection and impact on code performance by 'yield' while iterating over data reader object
- Visual Studio Code Analysis Rule - "Do not expose generic lists"
- Moving From LINQpad to a Proper Visual Studio Project?
- .NET String parsing performance improvement - Possible Code Smell
- LINQ Source Code Available
- Stored procedure called from C# executes 6 times longer than from SQL Management studio
- .NET 4 Code Contracts: "requires unproven: source != null"
- Performance tuning C# permutations and SHA1 code
- Is it possible to use linq in SQL Management Studio or use it in inline sql?
- increase Performance of the code
- How can I modify this C# code so that Visual Studio recognizes that I'm not an idiot?
- creating Linq to sqlite dbml from DbLinq source code
- Query Slow in Linq, Fast in LinqPad, SQL Management Studio and SQL Profiler
- WriteLine in Visual Studio like in LinqPad
- Are we compromising performance for achieving code readability when using LINQ?
- Query XML source in LinqPad using lambda syntax
- Visual Studio .Net source stepping for System.Linq
- Performance Question between two Linq Queries in LinqPad and in Practice
- How do I display total runtime in SqlServer Management Studio 2005?
- source code for LINQ 101 samples
- Query speed in SQL Server Management Studio (2008) vs NHibernate session.Query
- SQL Query much slower from Linq than directly from management Studio
- Linq query performance between C# and LINQPad
- Code performance on double for loop compare to linq/lambda
- List or Array of String Contain specific word in Html Source Code
- LinqPad Query to Visual Studio - how to use a nested query to populate a viewmodel
- c# Linq or code to extract groups from a single list of source data
- Debugging Visual Studio Linq query in LinqPad
- LinqPad query runs fine, but fails with Linq to Entities error running in visual studio
- How to add conditional condition to LINQ query based on a previously returned value
- Verify if a list (or a sublist of that list) of decimal values can equal a certain sum
- Using " Is NULL/not NULL" in LINQ To SQL
- How to read values from dictionary <String, List<Component>> on the basis of key passed using linq
- Complicated SQL query to Linq
- How could I LINQ's GroupBy() with a boundary?
- Using SQL "Not In" in LINQ
- Linq Contains issue: cannot formulate the equivalent of 'WHERE IN' query
- Pass a lambda expression in place of IComparer or IEqualityComparer or any single-method interface?
- Get number of records n a group in LINQ
- Group by version
- CSV with embedded commas using C# .Net 4.0 LINQ
- Testing if a value is contained within a Dictionary<TKey, List<TValue>>
- ASP.NET MVC C# Entity Convert to unknown type of unknown property
- How to select dynamically fields according to some another field in LINQ?
- Check if HUGE dictionary contains a string and get all elemets that match element
- LINQ to find first available numbered-suffix string
- Filtering array of objects inside object based on predicate
- How to generate unique product Serial no based on productID and productCategoryId using LINQ?
- IEnumerable has values but still gives System.NullReferenceException