Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Increasing query timeout
Message
De
12/03/2008 12:02:59
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01301341
Message ID:
01301362
Vues:
13
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform