title: SQL Performance slow when accessing most recent records
body: <p>I have a MSSQL2005 database that has records dating back to 2004, there are currently just under 1,000,000 records in one particular table.</p>
  
  <p>Thing is, if I run a report comparing 2009 data against 2010 data, 2008 against 2009, 2009 against 2009 or any combination of years before this year then results are returned in 1-5 seconds.</p>
  
  <p>If however I run a report that includes 2011 data then the report takes ~6 minutes.</p>
  
  <p>I've checked the data and it looks similar to previous years and is cross-referenced against the same data used in all of the reports.</p>
  
  <p>It's as if the database has exceeded some limit; that data for this year has become fragmented and therefore harder to access. I'm not saying this is the case  but it may be for all I know.</p>
  
  <p>Anyone have any suggestions?</p>
  
  <p>Shaun.</p>
  
  <p>Update:<br>Since posting the question I found <b>DBCC DBREINDEX <i>table_name</i></b> which seems to have done the trick.</p>