Sql server® 2012 t-sql fundamentals


TABLE 9-2   Lock Compatibility Including Intent Locks Requested Mode



Download 10,93 Mb.
Pdf ko'rish
bet342/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   338   339   340   341   342   343   344   345   ...   443
Bog'liq
BookSQL

TABLE 9-2

  Lock Compatibility Including Intent Locks



Requested Mode 

Granted 

Exclusive (X)

Granted Shared 

(S)

Granted Intent 

Exclusive (IX)

Granted Intent 

Shared (IS)

Grant request for exclusive?

No

No

No



No

Grant request for shared?

No

Yes


No

Yes


Grant request for intent exclusive?

No

No



Yes

Yes


Grant request for intent shared?

No

Yes



Yes

Yes


SQL Server determines dynamically which resource types to lock. Naturally, for ideal concurrency, 

it is best to lock only what needs to be locked, namely only the affected rows. However, locks require 

memory resources and internal management overhead. So SQL Server considers both concurrency 

and system resources when it is choosing which resource types to lock.

SQL Server might first acquire fine-grained locks (such as row or page locks), and in certain circum-

stances, try to escalate the fine-grained locks to more coarse-grained locks (such as table locks). For 

example, lock escalation is triggered when a single statement acquires at least 5,000 locks, and then 

for every 1,250 new locks, if previous attempts at lock escalation were unsuccessful. 

In SQL Server 2008 and SQL Server 2012, you can set a table option called LOCK_ESCALATION by 

using the ALTER TABLE statement to control the way lock escalation behaves. You can disable lock es-

calation if you like, or determine whether escalation takes place at a table level (default) or a partition 

level. (A table can be physically organized into multiple smaller units called partitions.)

www.it-ebooks.info




Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   338   339   340   341   342   343   344   345   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish