mysql - Performance between trigger and ordinary update query -


i in great confusion performance between trigger , ordinary update query. in site running cron operation in consists of 2 tables 1. cron log table 2. metadata table crons runs every minute. there 2 ways(i think) update both table,

  1. i fetching datas cron log table , calling wistia api upload files. after getting response wistia can update status in both tables via code.

  2. i fetching datas cron log table , calling wistia api upload files. after getting response wistia can update status in "cron" table via code , can use trigger update "metadata" table after cron table update.

i don't know whether right hit metadata table regualarly when site fetching datas there. in 2nd step in confusion trigger may take time fetch data , update metadata table. trigger has no control on there. please suggest me steps high performance. better trigger or update ?


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -