Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Comments
AshishChaudha 18-Jun-12 7:31am    
How do we know what query you are executing in sql server...how many records are there in your portal..have you used indexing in your table from which you are searching records???
DINESH K MAURYA 18-Jun-12 8:08am    
record 17543 rows,
i am not using index
but when i search all record it working fine.

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.
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900