Wednesday, January 21, 2015

Query records without waiting for unlock in SQL server

SQL Table hints specify additional options for query execution.
For a normal query in SQL server the query execution is halted temporarily if a records is being committed which results in significant delay if large number of records are being updated constantly. To avoid this issue, use with (nolock) in the from statement of the query which results in slighly older dataset, but quicker execution

Also, there is a related  table hint READPAST which just ignores the records already in lock state while querying, thus improoving performance.

More information can be found at http://www.techrepublic.com/article/using-nolock-and-readpast-table-hints-in-sql-server/

No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...