Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing a query
Message
 
 
À
09/09/2008 14:18:54
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Divers
Thread ID:
01345942
Message ID:
01346169
Vues:
12
>>If the potential for dirty reads is not an issue, you could add 'WITH (NOLOCK)' table hint to eliminate locks during the select
>>
>>
>>SELECT Client.Numero FROM Client WITH (NOLOCK)
>>  WHERE Client.NoEntity=@NoEntity AND Client.Fic_Date<@Fic_Date 
>> 	AND Client.Loss_Code=@Loss_Code AND Client.CType=@CType
>> 	AND EXISTS ( SELECT 1 FROM Invoice WITH (NOLOCK) WHERE Client.Numero=Invoice.NoClient 
>>                AND Invoice.Amount=@Amount)
>>
>
>Could you define "dirty reads"? Also, is the NOLOCK ANSI SQL compliant?

With NOLOCK is a SQL Server option.

Open Help in SQL Server, Search and type "dirty reads".
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform