php - Cron to check dates in large MySQL database -
i have database around 8 fields in various tables dates , these need checked everyday if or have expired.
i want use cron job achieve this, baring in mind database have 50,000 rows possibly more. running script checks of dates time out.
i thinking of segmenting search script chunks. run few thousand rows stop. 5 minutes later pick left of, querying field in database stores last finished. , once has iterated through rows stop.
but don't know if wise or possible script set run again in 5 minutes.
any advice appreciated.
you wouldn't have run on complete table. run query right?
select tbl_name now() >= date_col;
Comments
Post a Comment