<p>Why should I or shouldn't I use dirty reads:</p>

<pre><code>set transaction isolation level read uncommitted
</code></pre>

<p>in SQL Server?</p>

[{'answer_id': 20879, 'author': 'Tokabi', 'author_id': 315, 'author_profile': 'https://Stackoverflow.com/users/315', 'pm_score': 3, 'selected': False, 'text': '<p>Generally when you need to do a sizeable (or frequent) queries to busy tables, where read committed would possibly be blocked by locks from uncommited transactions, but ONLY when you can live with inaccurate data. </p>\n\n<p>As an example, on a gaming web site I worked on recently there was a summary display of some stats about recent games, this was all based on dirty reads, it was more important for us to include then exclude the transactional data not yet committed (we knew anyway that few, if any, transactions would be backed out), we felt that on average the data would be more accurate that way.</p>\n'}, {'answer_id': 20881, 'author': 'SQLMenace', 'author_id': 740, 'author_profile': 'https://Stackoverflow.com/users/740', 'pm_score': 0, 'selected': False, 'text': '<p>use it if you want the data back right away and it is not that important if it is right<br>\ndo not use if if the data is important to be correct or if you are doing updates with it</p>\n\n<p>Also take a look at snapshot isolation which has been introduced in sql server 2005</p>\n'}, {'answer_id': 20890, 'author': 'Yaakov Ellis', 'author_id': 51, 'author_profile': 'https://Stackoverflow.com/users/51', 'pm_score': 5, 'selected': True, 'text': '<p>From <a href="http://msdn.microsoft.com/en-us/library/aa259216(SQL.80).aspx" rel="noreferrer">MSDN</a>:</p>\n\n<blockquote>\n  <p>When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. </p>\n</blockquote>\n\n<p>Simply put, when you are using this isolation level, and you are performing multiple queries on an active table as part of one transaction, there is no guarantee that the information returned to you within different parts of the transaction will remain the same. You could query the same data twice within one transaction and get different results (this might happen in the case where a different user was updating the same data in the midst of your transaction). This can obviously have severe ramifications for parts of your application that rely on data integrity.</p>\n'}, {'answer_id': 34477845, 'author': 'K ROHAN', 'author_id': 5719882, 'author_profile': 'https://Stackoverflow.com/users/5719882', 'pm_score': -1, 'selected': False, 'text': '<p>The Thing is when you want to read the data before committing, we can do with the help of set transaction isolation level read uncommitted, the data may, or may not change.</p>\n\n<p>We can read the data by using the query:</p>\n\n<pre><code>Select * from table_name with(nolock) \n</code></pre>\n\n<p>This is applicable to only read uncommitted isolation level.</p>\n'}]
['https://Stackoverflow.com/questions/20840', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/357/']