Showing posts with label Locking. Show all posts
Showing posts with label Locking. Show all posts

Monday, July 13, 2026

.::: How to Simulation Blocking,Lock, Locking Identifying and Avoiding Deadlocks MariaDB MySQL & Advanced PROCESSLIST Update Juli 2026 :::.

 
correlation 

https://teguhth.blogspot.com/2023/09/how-to-sample-simulation-blocking.html

1. SIMULASI LOCKING

Session 1 - root - session_id 3

select connection_id() as session_id, user() as user;
START TRANSACTION;
UPDATE pembelian 
SET JUMLAH_PEMBELIAN = 10 
WHERE KODE_PEMBELIAN = 'BEL-E001';

select connection_id() as session_id, user() as user; START TRANSACTION; UPDATE pembelian SET JUMLAH_PEMBELIAN = 10 WHERE KODE_PEMBELIAN = 'BEL-E001';

 
 

Monday, March 30, 2026

::: Simalation Locking, Blocking & Deadlock in SQl Server MSSQL, LCK_M_S(locking), LCK_M_X(Blocking Deadlock) :::.

 
Mantap ini contoh tabel kamu sudah pas untuk bikin simulasi.
Saya buatkan 3 skenario nyata di SQL Server: locking ? blocking ? deadlock (step-by-step, tinggal kamu jalankan di 2 query window / session).

1. SIMULASI LOCKING

Session 1 (Window 1) (session 64 sa)

SELECT @@SPID as session_id;
BEGIN TRAN;
UPDATE pembelian 
SET JUMLAH_PEMBELIAN = 10 
WHERE KODE_PEMBELIAN = 'BEL-E001';
 

Session 2 (session 60 sa)
 

Popular Posts