Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools and techniques to optimize a LINQ to SQL query [closed]

I have a couple of LINQ to SQL queries that I feel take a lot of time. What tool and techniques can I use to first find out:

  1. How long they take and if there is room for improvement?
  2. Find out what I can change and easily test if those changes are effective?

Both tools, techniques and reading resources would be appreciated (ergo up-voted ;))

like image 574
Riri Avatar asked Dec 03 '22 07:12

Riri


1 Answers

I just attended a LINQ Tools presentation at a recent codecamp event given by Jim Wooley, one of the authors of LINQ In Action. He blogged about all the tools. Here are the ones that relate to your question, but his post lists other goodies to look into.

  • SQL Server Profiler ($$$) - part of the SQL Management Studio.

  • Huagati LINQ to SQL Profiler ($$$, 45-day trial) - Profiler which extends the Context.Log functionality. Includes performance and call stacks for the queries beyond what you get with SQL Server Profiler.

  • LINQ to SQL Visualizer (free) - part of the C# Samples for VS2008. Download, compile, enjoy!

  • LINQPad (free, pay for C# Intellisense) - light-weight tool to run C#/VB.NET code, connect to DBs, test Linq to SQL, view the generated SQL etc.

like image 200
Ahmad Mageed Avatar answered Dec 21 '22 23:12

Ahmad Mageed