How to avoid read locks in my database?

How to avoid read locks in my database?

Responses to several databases are welcome!

+6
performance sql database locking
source share
5 answers

Oracle uses Read isolation isolation mode by default, where the select statement is not blocked by another transaction that modifies the data it reads. From Concurrency Data and Consistency :

Each request executed by a transaction sees only the data that was made before the request (and not the transaction). An Oracle query never reads dirty (uncommitted) data.

+2
source share

In SQL Server, you can use the with (nolock) keyword in your select statements. For example:

Select table1.columna, table2.columna from table1 with(nolock), table2 with(nolock) 

Be sure to specify (nolock) for each table / view in the query.

+3
source share

Jeff Atwood has a good post in this thread:

http://www.codinghorror.com/blog/archives/001166.html

+2
source share

In Firebird, writers never block readers and have no dirty readings. Read-only and snapshot isolation levels.
It uses a multi-generational mechanism (like an oracle, I believe) instead of just blocking a page or post.

+2
source share

PostgreSQL also uses MVCC (Multi-Version Concurrency Control), therefore, using the default transaction isolation level (read with commit), you should never block unless someone is supporting the database (deleting / adding columns / tables / indexes / etc).

+2
source share

All Articles