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:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...