SQL Performance slow when accessing most recent records

前端 未结 1 1624
名媛妹妹
名媛妹妹 2020-12-11 20:48

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.

Thing is, if I run a repo

相关标签:
1条回答
  • 2020-12-11 21:17

    What do the execution plans look like? If different you might need to manually update statistics on the table as the newly inserted rows are likely to be disproportionately unrepresented in the statistics and it might thus choose a sub optimal plan.

    See this blog post for an explanation of this issue Statistics, row estimations and the ascending date column

    Additionally check that your 2011 query isn't encountering blocking due to concurrent inserts or updates that do not affect queries against historic data.

    0 讨论(0)
提交回复
热议问题