SQL Server版本升级和缓存执行计划

发布于 2024-10-12 22:57:56 字数 281 浏览 8 评论 0 原文

我刚刚将 SQL Server 2008 R2 Express 版升级到 SQL Server 2008 R2 标准版。安装工具已执行升级,没有任何问题。

然而,承诺的性能提升并不在这里。例如,SQL Server 使用单 CPU 核心。

我假设 SQL Server 仍然使用 SP 的“旧”执行计划。如果是这样,有没有办法重建/重置执行计划?

或者在将 Express 版本升级到 Standard 版本时我应该考虑其他事项吗?

另请告知我是否应将其移至 ServerFault。

I've just upgraded SQL Server 2008 R2 Express Edition to the SQL Server 2008 R2 Standard edition. The setup tool has performed the upgrade without any problems.

However, the promised performance boost is not here. For example, the SQL Server uses the single CPU core.

I assume that the SQL Server still uses the "old" execution plans for SPs. If so, is there a way to rebuild/reset execution plans?

Or should I consider something else when upgrading an Express to Standard edition?

Please also let me know if this should be moved to ServerFault.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南街九尾狐 2024-10-19 22:57:56

执行计划仅存在于内存中。升级产品意味着更换二进制文件,这意味着新的流程。因此,您不可能有“旧”计划,每个缓存或正在执行的计划都是新的 R2 计划。

至于为什么您没有看到 SQL Server 使用多核,可能有多种原因:

  • 您只从一个会话/连接发送请求,因此根本没有并发性
  • 您的负载没有可以从并行扫描中受益的查询(对于大多数负载来说,这实际上是一个的想法,这意味着它们已经只扫描少量数据)
  • 您的服务器被硬编码到一个CPU亲和性掩码(这可能是在升级过程中继承的)
  • 您的观察方法可能是错误的,SQL Server 实际上使用了所有核心

Execution plans are in memory only. Upgrading the product implies a replacement of the binaries, that implies a new process. Therefore you cannot possibly have a 'old' plans laying around, every single plan cached or in execution now is a new R2 plan.

As to why you do not see SQL Server using multiple cores, there could be a multitude of reasons:

  • you only send requests from one session/connection, thus there is no concurrency at all
  • your load does not have queries that can benefit from parallel scans (which is actually a good think for most loads, it means they already scan only small amounts of data)
  • your server is hard coded to one CPU affinity mask (this could had been inherited during upgrade)
  • your observation methodology could be wrong and SQL Server does actually use all cores
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文