Jump to content
  • 0

Как ускорить TRIGGER


xaero
 Share

Question

Привет всем!!!

у меня есть триггер который удаляет из двух таблиц:

DELIMITER #
CREATE TRIGGER `otz_delete` BEFORE DELETE ON orders_status_otzvon
FOR EACH ROW BEGIN
/* delete from crm_telephony */
DELETE FROM crm_telephony WHERE id_zv=OLD.id_zv AND type='otzvon';
/* delete from crm_log */
DELETE FROM crm_log WHERE log_id=OLD.id_zv AND process=28;
END;#

Результат можно посмотреть здесь (это у меня локалке так работает 26 сек) :

http://www.jetScreenshot.com/demo/20090608-78y-29kb.jpg

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy