tags:

views:

39

answers:

2

I know it's available since version 5.1,but :

  1. Is it stable?
  2. Is it possible to trigger event when there is insert/update operation on specific columns instead of the whole table?
+1  A: 
  1. To my experience, yes, totally
  2. Not exclusively, but you can add a check in the body of the trigger: IF(OLD.col <> NEW.col, ...)
Raveren
Will operation become slow because of trigger?I mean will it wait for the trigger to finish?
I had no noticeable performance changes since I started using it on a semi-large system. The thing you should consider most before starting to use triggers, is do you want to mix database and business logic together. I'd personally advise against it, I only used it to bring some sense into a poorly built db.
Raveren
A: 
  1. To my experience, yes.
  2. Trigger functionality is very limited. You have FOR EACH ROW option but no WHEN. It is also very limited what you can do inside the trigger. If you expect the requirements to change later (i.e. the project will go on), I would not opt to do business logic in mysql triggers. If it contains some simple check or consistency update it can do a good job.
sibidiba