If you have a LARGE web system with 300-500 files/templates and 30-100 tables :eek2:, sometimes you need to execute a chains of MySQL queries in order to mantain data integrity. You need to execute these chains from several times from the several scripts. If you put each chain in a separate file and then will include each time when needed the system performance will decrease.
But if you put each chain in the database and will retrieve each time you need it, the whole system will work faster (especially with MySQL caching).
The problem of large applications - great amount of files to include and memeory usage. Moreover file open/read functions quite slow.
- put MySQL queries into database only in large projetcs/applications