title: ObjectTrackingEnabled and linq-to-sql
body: <p>I read <a href="http://www.sidarok.com/web/blog/content/2008/05/02/10-tips-to-improve-your-linq-to-sql-application-performance.html">here</a> that when querying data for a read operation, setting <code>ObjectTrackingEnabled</code> to <code>false</code> gives somewhat of a performance boost. My queries look like this:</p>
  
  <pre><code>public return type TheQueryName (some parameters)
  {
     using (TheDC MyDC = new TheDC())
     {
         var TheQuery = (...).ToList();
  
         return TheQuery;
     }
  }
  </code></pre>
  
  <p><strong>1)</strong> If I want to add the performance enhancement, do I just add the line <code>ObjectTrackingEnabled = true;</code> just before the line <code>var TheQuery = (...).ToList();</code></p>
  
  <p><strong>2)</strong> Also, if I set <code>ObjectTrackingEnabled</code> to <code>true</code> in a query, do I need to set it to false before returning or am I just setting <code>ObjectTrackingEnabled</code> for the particular instance of the data context and the following time I'll instantiate a new data context the value of <code>ObjectTrackingEnabled</code>  will revert back to its default state of <code>false</code>?</p>
  
  <p><strong>Note: I only plan do add <code>ObjectTrackingEnabled = false;</code> to read operations.</strong></p>
  
  <p>Thanks.</p>