Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've recently been focusing on this for my company, and I've learned some interesting things about specifically query optimization.</p> <p>I've run SQL Profiler for a half hour at a time and logged queries that required 1000 reads or more (then later ones that required 50 CPU or more).</p> <p>I originally focused on individual queries with the highest reads and CPU. However, having written the logs to a database, I was able to query aggregate results to see which queries required the most aggregate reads and CPU. Targeting these actually helped a lot more than only targeting the most expensive queries. </p> <p>The most expensive query might be run once a day, so it's good to optimize that. However, if the 10th most expensive query is run 100 times an hour, it's much more helpful to optimize that first.</p> <p>Here's a summary of what I've learned so far, which can help you get started in identifying queries for optimization:</p> <p><a href="http://www.foliotek.com/devblog/sql-server-database-optimization-a-beginners-guide/" rel="nofollow">A Beginner's Guide to Database Query Optimization</a></p> <p><a href="http://www.foliotek.com/devblog/highly-inefficient-linq-queries-that-break-database-indexing/" rel="nofollow">Highly Inefficient Linq Queries that Break Database Indexing</a></p> <p><a href="http://www.foliotek.com/devblog/an-obscure-performance-pitfall-for-test-accounts-and-improperly-indexed-database-tables/" rel="nofollow">An Obscure Performance Pitfall for Test Accounts and Improperly Indexed Database Tables</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload