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
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement