
Ask HN: Dirty Reads for Databases:  Good Thing or Bad? - jonballant
I&#x27;m doing some research on database isolation levels and which allow dirty reads through isolation level READ UNCOMMITTED.  The advantage seems to be speed and latency but at the cost of accuracy and consistency.  My question for the community is if allowing Dirty Reads is preferred?
======
brudgers
Like everything, it depends on the use case. Public facing financial
transactions have different objectives than an RSS feed of LoL Cat pictures.

~~~
jonballant
Fair enough. In my case I am making recommendations to clients, so it sounds
like it is best to take it on a case by case basis. The majority of the
literature seems to be about avoiding Dirty Reads, but there are some
beneficial uses.

------
sagargandecha
I'm certainly not the most knowledgeable in this at all, but if I'm not
mistaken most environments I've worked in have been only the dev instance
allows it, while UAT and production won't allow any dirty reads.

~~~
jonballant
It depends. A couple databases have a default isolation level that allow dirty
reads. Most SQL databases allow you to manually change the isolation level or
ReadConcern level to allow Uncommitted Reads if you choose.

------
Robin_Message
Since the transaction that did the write is uncommitted, dirty reads are
generally a bad idea as you may act based on something that is subsequently
thrown away.

Only useful use I've found for them: emulating sequences on a DB without them.

~~~
jonballant
Could another use be to debug something that is happening inside a
transaction?

[https://stackoverflow.com/questions/2471055/why-use-a-
read-u...](https://stackoverflow.com/questions/2471055/why-use-a-read-
uncommitted-isolation-level)

