SQL Locking Granularity

Veröffentlicht am: 13 Juli 2023
auf dem Kanal: Database Dive
932
14

In this sql tutorial we'll walk you through what sql locking granularity is and how to work with sql locks to achieve the best results. All examples in this sql tutorial video will be based on MySQL server.

The MySQL server offers 2 lock granularity levels:

1. Table-level locking
2. Row-level locking

Table-level locking only allows one SQL session to update a table at a time.

Row-level locking applies locks on rows based on SQL queries.

In MySQL server, Row-level locking has two subtypes:

1. A shared lock permits a transaction that locks the row to read it.
2. An exclusive lock permits a transaction that locked the row to update or delete the row.

In MySQL server, table-level locks are used by 3 storage engines:

1. MyISAM
2. MEMORY
3. MERGE (MRG_MyISAM)

In MySQL server, row-level locks are used by InnoDB and Percona Server XtraDB.

Music:
Hey! - Tobjan   / tobjanmusic  
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/3r1kvCG
Music promoted by Audio Library:    • Hey! – Tobjan (No Copyright Music)  

#shorts #reels #database #sql #mysql #web #webdevelopment #developer


Auf dieser Seite können Sie das Online-Video SQL Locking Granularity mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Database Dive 13 Juli 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 932 Mal angesehen und es wurde von 14 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!