I have 50 tables. In each table I want only 100 rows at any time. Hence for every table I want to perform below tasks automatically with the frequency as once in two minute 1. I want to insert some data in the table. 2. If number of records exceeds 100, I want to delete oldest rows and keep only latest 100 rows.
So for this, I am thinking to set cron job My question is whether I should create separate cron jobs for each table ? or should I do these two tasks in single cron job for each table sequentially ?
software details I have a web site running on hosted web server with Linux as OS I am using phpmyadmin and I have only c panel account (no CLI access) Hosting Package:500mb cPanel Version:82.0 (build 7) Apache Version:2.4.39 PHP Version:7.0.33 MySQL Version:10.2.26-MariaDB Architecture:x86_64 Operating System: linux
Currently I have only 5 tables. hence I have 5 separate cron jobs defined for each table
-
Expecting the efficient way of doing this task
Aucun commentaire:
Enregistrer un commentaire