I have about 100 scripts which are running, some of them can not be run at the same time with others so between those scripts I create flags 0 - 1 with text files, script before proceed are reading text file if its 1 its ok to go if 0 than script stop executing. After a month of work I hit performance problems with those scripts because cron run those scripts every minute ( not all of them at the same time but some of them) so my question is, is there any difference in performance if I will move those flags from text files and will create them in MYSQL. What is your opinion ? Thank You
I would go with using the database but that's more of a personal taste than anything. It just seems like a cleaner solution to me. Both probably work and I doubt there's much of a performance difference because all the work will be in actually running the scripts. I would work on optimizing the scripts themselves if possible.
Well what u use i think is called a flat file solution i dont think there is much of a diffrence atleast a big diffrence but mysql is little easier to manage and is a better solution overall
Unless you have overlap in your crons (and two scripts try to write to the same file at the same time, etc) you shouldn't have any issues with using simple text files. Your performance problem is likely elsewhere.