>>>>> "Gregor" == Gregor Brabyn <[email protected]> writes:
Gregor> The problem I am having is that I need to summarize all
Gregor> the past data which spans over 1000 days and I am finding
Gregor> that the MySQL query to collect one day's worth of
Gregor> summaries can easily take 5 minutes. I am thinking that if
Gregor> I run a CRON to summarize a day's data into the
Gregor> warehousing table every 15 minutes then it is going to
Gregor> take something like 11 days.
Different database? Mysql isn't particularly good at optimising queries.
Gregor> At present I am also unsure of the settings on the Apache
Gregor> server, I don't think I will be able to have scripts
Gregor> operating for more that 10 minutes before Apache stops
Gregor> them and at busy times of day my script to summarize a
Gregor> day's data could easily end up exceeding this.
Yeah, you really must protect scripts in circumstances like this, so
you don't start a 2nd one if the first could still be running.
Gregor> Anyone got experience and good advice on dealing with
Gregor> these issues.
I would first check if your mysql query was written well enough. Post
the structure of your table and your summarise query so we can have a
look.
If that's ok, it means mysql is too slow. you could try postgresql for
example. If that's not an option, you just need a faster computer.
--
Cheers,
Berend de Boer
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---