Issue
I know in some case we have to run magento cron as if it is some file or logic base. But If I just want to perform some task regarding to just database like want to update or delete some record from database in this case which one is best based on performance ? Should I create event scheduler in mysql or magento cron ?
Solution
If your operations are strictly database-related and that your ONLY concern is the performance, you should use the mysql scheduler. Your tasks will be directly registered and executed natively on the SQL server, while Magento's cron will go like this :
- Server's crontab hitting cron.sh of Magento
- cron.sh hitting cron.php
- The cron.php will boostrap Magento (time consuming)
- Check all the events (including other SQL requests for the config of these events !!)
- Running what he must, including your DB update script, with the overhead of the framework and PHP.
Answered By - OddBrew