Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are MySQL Triggers Asynchronous

Tags:

mysql

triggers

When an AFTER UPDATE or AFTER INSERT trigger is fired is it a synchronous or asynchronous event? In other words does it hold up the total execution time of the query that tripped the trigger?

like image 597
D-Rock Avatar asked Apr 17 '09 17:04

D-Rock


2 Answers

Yes, triggers are synchronous. However if you need to implement asynchronous MySQL triggers you can utilize Maxwell + custom code to easily read MySQL binary log and launch your own logic on interesting events.

like image 192
matt Avatar answered Oct 15 '22 22:10

matt


Trigger are not asynch. Yes, they will increase the time it takes for an update or insert to complete.

like image 36
tpdi Avatar answered Oct 15 '22 22:10

tpdi