Row-Level Database Locks Explained - (Read vs Exclusive)

  Рет қаралды 33,252

Hussein Nasser

Hussein Nasser

Күн бұрын

Пікірлер: 19
@sameep1834
@sameep1834 3 жыл бұрын
big mans right here explained 1 hour worth of content on locks in 8 mins
@Jose-xh3tz
@Jose-xh3tz 2 жыл бұрын
Lol, that's really helping my exam preparation. Thanks! Just a question popped out, why Charlie doesn't have to wait for Alice since he's acquiring an exclusive lock...is it simply bcz that part of Alice is not involved? Thanks!
@maxdenusenko8989
@maxdenusenko8989 Жыл бұрын
same question
@winfle
@winfle Жыл бұрын
he aquire an exclusive lock not on table, but on row
@northeastpaintingservice4510
@northeastpaintingservice4510 4 жыл бұрын
Nice video brother 👍
@developerfoe
@developerfoe 2 жыл бұрын
what an explanation... superb
@ayazahamed8254
@ayazahamed8254 Жыл бұрын
Very Well Explained.
@kaustubhkhare4086
@kaustubhkhare4086 4 жыл бұрын
Suppose I have 200k rows to update which might take around 10 minutes. At the same time I need to read some of the records. What would be the best way to do that?
@hnasr
@hnasr 4 жыл бұрын
Kaustubh Khare it really depends do you care if others modified or read those rows while you are reading it in those 10 minutes? Will it lead to inconsistencies? If you don’t want others writing or reading then use isolation level serializable (2 phase lock) If you want people reading and writing while you are but you don’t to see their changes while they are writing use isolation level repeatable read If you dont care if you read others changes use read committed isolation level The 3 operations are ordered from slowest /highest consistently and isolation to the fastest but least isolation and consistency Hope that helps
@kaustubhkhare4086
@kaustubhkhare4086 4 жыл бұрын
Hussein Nasser Thanks
@hdtube99
@hdtube99 4 жыл бұрын
Why not just call them as READ lock and WRITE lock?
@hnasr
@hnasr 4 жыл бұрын
James Yu I agree easier names, engineers love to complicate things.
@Timba246
@Timba246 3 жыл бұрын
because shared means it can be shared and exclusive means it cant be shared, thats intuitive we cant say this about read and write
@vyshnavramesh9305
@vyshnavramesh9305 3 жыл бұрын
Maybe because there is this another lock 'Update lock. Its used for SELECT statements which can be followed by any write statement on the selected data.
@Yaxoi
@Yaxoi 2 жыл бұрын
My professors at university actually call them that
@basheeral-momani2032
@basheeral-momani2032 2 жыл бұрын
thanks for putting this video for all
@devmatrix6373
@devmatrix6373 3 жыл бұрын
Can u suggest a book for database design That has staff like lock and advanced topics
@freddyv5353
@freddyv5353 2 жыл бұрын
"Database Internals" by Alex Petrov
@ergis8004
@ergis8004 Жыл бұрын
MongoDB doesn't have shared lock in transactions sadly, with what I've researched. You have to use application locks or use some manual "locked" field or some sort.
PostgreSQL Locking Issues: a talk for devs and DBAs
39:42
Postgres Open
Рет қаралды 10 М.
How Do Databases Store Tables on Disk? Explained both SSD & HDD
18:56
Hussein Nasser
Рет қаралды 28 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,5 МЛН
Муж внезапно вернулся домой @Oscar_elteacher
00:43
История одного вокалиста
Рет қаралды 5 МЛН
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
Column vs Row Oriented Databases Explained
34:16
Hussein Nasser
Рет қаралды 78 М.
3 reasons you should use Postgres Functions and Transactions
16:58
Best Practices Working with Billion-row Tables in Databases
13:41
Hussein Nasser
Рет қаралды 70 М.
When should you shard your database?
21:20
Hussein Nasser
Рет қаралды 79 М.
MySQL и PostgreSQL: что «под капотом» и почему это важно знать прикладному разработчику
1:01:24
Spectr — команда разработки цифровых сервисов
Рет қаралды 22 М.
The Problem with Time & Timezones - Computerphile
10:13
Computerphile
Рет қаралды 4 МЛН
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 255 М.
They Enabled Postgres Partitioning and their Backend fell apart
31:52
Hussein Nasser
Рет қаралды 43 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,5 МЛН