Re: How to deal with summary data and reports

2006-08-29 Thread Aleksandar Ivanisevic
Matthew Wilson writes: [...] >I suspect this is a universal problem. All general advice would be >appreciated. Perhaps a stored procedure is not the way to go. Mysql 5.1 has CREATE EVENT, that somewhat mimics Oracle's jobs. I prefer to run a shell script in a cron job, like this: #!/bin/bas

How to deal with summary data and reports

2006-08-29 Thread Matthew Wilson
I wrote a fairly large query that summarizes our sales into monthly totals by business unit, then left joins on some other information from a bunch of other tables. Running the query takes a long time. I'm considering whether to store my summary data as a table, like this: create table monthly_t