Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing a SQL command
Message
De
13/09/2013 13:05:41
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01583170
Message ID:
01583186
Vues:
36
>I would start from trying to discover which JOIN takes the most time by eliminating JOINs one by one. Recently I had a similar situation (although the query was much more complex). I removed LEFT JOIN and made a temporary table of the rest and then LEFT JOINed with that temp table instead. The query that took originally more than 1 minute, now takes less than a second. The client called that procedure "lightingly fast".
>
>And after that experience I figured out that it's always a good idea to improve the performance gradually to get these comments :)

It is not related to INNER JOINs. I have simplified it to this point:
SELECT Task.Numero AS LXPrimaryKey,Task.Title,'' AS PrecisedTime,Task.Instance,Task.Class,Task.Method,
 '' AS Log2,Task.LoopDateStart,Task.LoopDateEnd,Task.AddDate,Task.ModDate,Task.Precised,Task.Log
 FROM Task (NOLOCK)
 ORDER BY Task.Title 
And, this takes over 1 second to return the maximum number of recordsin that table, which is 43.

Based on the transport level connection error we got on that one, I suspect data corruption. I will try to simplify more and will provide feedback after.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform