sql - Impact on performance while creating a view on a table and fetch all the data from table -


i want reduce locking on server because users in application have direct rights database , execute query without nolock creates locks in database.

to reduce this, want create new schema database , in schema i'll create views on tables present in database. in view i'll write as:

 select * table_name(nolock). 

and i'll give rights users schema only, in way it'll reduce locking.

is approach approach? , create overhead in database?

please suggest.

from bol on nolock (readuncommited) hint:

specifies dirty reads allowed. no shared locks issued prevent other transactions modifying data read current transaction, , exclusive locks set other transactions not block current transaction reading locked data. allowing dirty reads can cause higher concurrency, @ cost of reading data modifications rolled other transactions. this may generate errors transaction, present users data never committed, or cause users see records twice (or not @ all).

if acceptable you, can consider approach. sure speed performance of queries. must not idea, can cause number of other unpredictable bugs - if use data read nolock later operations.

here nice blog post dangers of using nolock , other possible solutions can implement avoid using it.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -