Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Increasing query timeout
Message
From
12/03/2008 12:02:59
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01301341
Message ID:
01301362
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
I was getting this error pretty frequently at one project I inherited.

The previous developer did something I think to be very strange...

(this is not exactly functioning code, but just to give you the idea)

SELECT field1,getcustomername(customerid) FROM mytable

getcustomername
lparameters icustomerid
select customername from customer where customerid = icustomerid
return customername

He must have been thinking about reusing code, but not about SQL Server query optimization.

SELECT ;
field1,;
nvl(customer.customername,space(50)) as customername ;
from mytable ;
left outer join customer on customer.customerid = mytable.customerid

Was significantly faster.

>Hi everybody,
>
>We have problems with our test server. It often gives us
>
>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
>
>Stack Trace:
>
>
>[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
> System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +862234
>-------------------------------------------------------------------------
>What could we do to fix the problem?
>
>Thanks a lot in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform