Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is a NOLOCK?

Answers were Sorted based on User's Feedback



What is a NOLOCK?..

Answer / michael

Advantage:
applying nolock in select statement will increase
concurreny and performance in fetching.

Disadvantage:
it does'nt consider the transaction scenario, even if the
transaction is under process not yet commited or rollback
it will fetch the current record
eg

begin tran
insert into tablename
values('1','asdf')

select * from tablename with (nolock)

-- it will display the table with inserted record.
but the transaction is not completed, it can be rollback
so it became dirty read.

Is This Answer Correct ?    28 Yes 2 No

What is a NOLOCK?..

Answer / naren

Using NOLOCK politely asks SQL Server to ignore locks and
read directly from the tables. This means you completely
circumvent the lock system, which is a major performance
and scalability improvement. However, you also completely
circumvent the lock system, which means your code is living
dangerously. You might read the not-necessarily-valid
uncommitted modifications of a running transaction. This is
a calculated risk.

Is This Answer Correct ?    19 Yes 1 No

What is a NOLOCK?..

Answer / guest

Do not issue shared locks and do not honor exclusive locks.
When this option is in effect, it is possible to read an
uncommitted transaction or a set of pages that are rolled
back in the middle of a read. Dirty reads are possible. Only
applies to the SELECT statement.

Is This Answer Correct ?    16 Yes 3 No

Post New Answer

More SQL Server Interview Questions

How to create user defined functions with parameters?

0 Answers  


What is the usage of sign function?

0 Answers  


How to select true false based on column value in sql server?

0 Answers  


What’s the distinction between dropping a info and taking a info offline?

0 Answers  


what are three different authentications to connect linked servers?

1 Answers   CitiGroup,


two tables with table name ship(name,year) and battle (name,year),how to find the latest added year in the table ship

1 Answers  


How to override dml statements with triggers?

0 Answers  


What is database replicaion? What are the different types of replication you can set up in SQL Server?

3 Answers  


write the query for find the top 2 highest salary in sql server

36 Answers   Cranes, Jayanti Software, Medi Assist, Rmax, TCS,


Assume,there are three tables in a database, Can i have both primary key and foreign key for each table in the same database?

4 Answers  


What is SQL Profiler and the use of it?

2 Answers   247Customer,


I have to display ten columns values from diffrent ten tables. how many joins are require?

10 Answers   CarrizalSoft Technologies, HCL,


Categories