Office SQL 查询运行时间长
我在 SQL Server 2008 中有一个数据库视图,当我从查询分析器运行它时,它会在几秒钟内运行。当我在 Excel 2007 中运行它时,它加载数据得很好。但是当我在 Word 2007 中的邮件合并中运行它时,它似乎需要很长时间才能运行(实际上是几分钟的运行时间)。
如果有人知道如何解决这个问题,可以告诉我吗?
I've got a database View in SQL Server 2008 and when I run it from Query Analyser, it runs within a couple of seconds. When I run it in Excel 2007, it loads the data just fine. But when I run it in Word 2007 on a mail merge, it just seems to take a very long time to run (literally minutes to run).
If anyone has an idea how to solve this, could they let me know?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SQL 2008 将允许您对查询运行 Profiler 跟踪。在启动 Word 查询之前启动跟踪并查看需要多长时间。我的猜测是邮件合并速度很慢。
如果 Excel 也很慢,您就会查看索引。
SQL 2008 will allow you to run a Profiler trace on the query. Start the trace before you kick off the Word query and see how long it takes. My guess is it's the mail-merge that's slow.
If it were slow in Excel too, you'd be looking at your indexes.