Why does this SQL batch INSERT hold locks for minutes?

Why does this SQL batch INSERT hold locks for minutes. The SQL code inserts millions of rows in one statement. In MySQL that holds locks until done. In SQL a huge insert blocks all other writes.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlbatchinsert #sqllock...

https://www.youtube.com/watch?v=jsfy-AaKG20

Why does this SQL batch INSERT hold locks for minutes? #sqlreliability

YouTube

Why does this SQL UPDATE lock the entire table?

Why does this SQL UPDATE lock the entire table. The SQL code updates with a condition that has no index. In MySQL it locks every row it scans. In SQL services one update blocks all other writes.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlupdate #sqllock #sqlfullsca...

https://www.youtube.com/watch?v=hxJMh219sf0

Why does this SQL UPDATE lock the entire table? #sqlanalytics

YouTube

What's wrong with this SQL LOCK WAIT timeout killing requests?

What's wrong with this SQL LOCK WAIT timeout killing requests. The SQL code has default innodb_lock_wait_timeout. In MySQL long held locks cause others to fail. In SQL tune or fix the long transactions.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqllock...

https://www.youtube.com/watch?v=JqGp9vyFXOU

Whats wrong with this SQL LOCK WAIT timeout killing requests? #sqldebugging

YouTube

Why does this SQL lock table block readers?

Why does this SQL lock table block readers in production. The SQL code runs a long update in a transaction, holding locks and blocking reads. In SQL services this causes latency spikes and timeouts.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqllock #sqltransaction #sqlla...

https://www.youtube.com/watch?v=s_mcOfxOi3s

Why does this SQL lock table block readers? #sqldebugging

YouTube