大查询在后台运行但没有显示完成状态? [英] big query running in the background but not showing completed status ?

查看:65
本文介绍了大查询在后台运行但没有显示完成状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个复杂的查询,需要10到20分钟才能完成执行。在SQL Azure数据库上运行的查询显示消息服务异常但同时它在后台运行。



我怎么知道查询已完成执行?有没有办法知道查询已经完成执行?



请建议任何知道查询完成状态的工作。



谢谢。

Hi,

I have a complex query which takes 10 to 20 minutes to complete its execution.While query running on SQL Azure Database it showing message "service exception" but at the same time it running in the background.

How i come to know that query has completed its execution ? Is there any way to know that query has finish its execution ?

Please suggest any apporach to know query completion status.

Thanks.

推荐答案

抱歉,这听起来像是一种可怕的蛮力方法。当然,在这样的查询(或SP?)完成之前很久就会有超时。消除症状通常不是一个好主意。



我建议尝试将此查询分解为更小,更可管理的步骤并尝试实现某些程序代码中这些查询之间的逻辑。 SQL用于编写关系数据库查询,而不是实现应用程序逻辑。
Sorry, but that sounds like a terrible brute force approach. Of course you will get timeouts long before such a query (or SP?) finishes. Doctoring away the symptoms usually is not a good idea.

I would suggest to try to break up this query into smaller and more managable steps and to try to implement some of the logic between those queries in program code. SQL is made to write relational database queries, not to implement application logic.


这篇关于大查询在后台运行但没有显示完成状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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