超时时间已到.在操作完成之前超时时间已过,或者服务器没有响应.在SQL Server中 [英] Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. in sql server

查看:182
本文介绍了超时时间已到.在操作完成之前超时时间已过,或者服务器没有响应.在SQL Server中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我已经根据客户名称搜索了某些字段.

当我在sql server management studio中搜索时,它过滤记录,并花费大约25秒钟的时间.
当我通过门户网站搜索时,它给出0条记录

超时时间已到.操作完成之前已过超时时间,或者服务器没有响应.

如何解决,请帮帮我.

感谢

Dear All,

i have search some field on the basis of customer name.

when i search in sql server management studio it filter record,and take time aprox 25 sec.
when i search by the portal it gives 0 record
or
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

how to solve it please help me.

thanks

推荐答案

可能是您的门户"服务器设置了执行超时,并且您的查询超出了该限制.如果在SSMS上完成查询需要25秒钟,则说明查询很复杂,或者您的数据库设计有问题.

在不知道数据库大小,任何索引以及查询性质的情况下,我们无法更加具体.
It may be that your "portal" server has an execution timeout set, and that your query is exceeding that limit. If you query takes 25 seconds to complete on SSMS, then it is an indication that the query is to complex, or you have a problem with your database design.

Without knowing the size of your DB, and any indexes, and the nature of your query we can''t be more specific.


几个基本的经验法则"多年来一直帮助我使用SQL

1.如果查询花费的时间超过2-3秒,则缺少适当的索引
2.如果查询花费的时间超过8-10秒,则该查询从根本上来说是有缺陷的,并且索引已损坏;重新设计查询,引入临时表,请参见规则#1
3.如果查询花费了超过15秒的时间,则某个地方存在锁争用,否则我应该真正寻求其他职业;检查并发活动并查看规则#2

查询分析器是您的朋友……使用它
A couple of basic ''rules of thumb'' that have helped me with SQL over the years

1. If a query takes more than 2-3 seconds, appropriate indices are missing
2. If a query takes more than 8-10 seconds, the query is fundamentally flawed AND indices are broken; redesign query, introduce temp tables, see rule #1
3. If a query takes more than 15 seconds, there''s a lock contention somewhere, or I should really seek another career; check concurrent activity and see rule #2

Query Analyser is your friend ... use it


这篇关于超时时间已到.在操作完成之前超时时间已过,或者服务器没有响应.在SQL Server中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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