crons
Posted: Mon Mar 27, 2006 3:09 am
I have a page which contains statistics from about 25 different mysql tables. each query pulls 20 records from each table, so its quite a bit of data/querying.
i currently have it set up to query all this data on every page load, which takes 3-4 seconds. this isn't good from a user perspective, or good on the server load.
so, i need to use a cronjob script to update the data, i understand that. my question comes in how/where to store the data?
do i need to make 25 more database tables?
that seems like overkill for a simple task.
I could make 1 table with a column for each table, and implode() the results with a unique string and store it in the corresponding table field, then explode the data when the page is viewed.
or, i could not even go with the database and read a text file.
what is the practice for doing something like this?
i currently have it set up to query all this data on every page load, which takes 3-4 seconds. this isn't good from a user perspective, or good on the server load.
so, i need to use a cronjob script to update the data, i understand that. my question comes in how/where to store the data?
do i need to make 25 more database tables?
I could make 1 table with a column for each table, and implode() the results with a unique string and store it in the corresponding table field, then explode the data when the page is viewed.
or, i could not even go with the database and read a text file.
what is the practice for doing something like this?