SQL工作问题 [英] SQL job issue

查看:63
本文介绍了SQL工作问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们遇到了一个奇怪的问题。如果我们在SQL作业中运行存储过程运行缓慢。但是,如果我们从SQL Server Management Studio查询窗口运行相同的存储过程,它会按预期运行得更快。有人遇到过这个问题吗?任何指针
来解决这个问题?我们有SQL 2016企业版。 

We are running into a wierd issue. If we run a stored procedure within a SQL job is running slow. But if we run the same stored procedure from SQL Server Management studio query window, it runs faster as expected. Did anyone run into this issue? Any pointers to troubleshoot this issue? We have SQL 2016 Enterprise edition. 

谢谢。

sqldev

推荐答案

无论手动执行SP还是通过Job执行,执行总是相同的。可能的原因是,在Job执行时,SQL Server更繁忙,或者表上有锁,这会使其速度变慢。
It doesn't matter if a SP is executed manually or by a Job, the execution is always the same. Possible reason is, that on the time of execution by Job the SQL Server is more busy or there are locks on the table(s), which slows it down.


这篇关于SQL工作问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆