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_totals as ( /* enormous SQL goes here */ ) If I do that, then I must keep the summary data synchronized with the underlying data, as the underlying data gets updated once a day, every day. Can a stored procedure delete and then rebuild the summary table? If so, then I may write stored procedures that would build these summary reports and when we load new data, we rerun the stored procedures to build the summaries. I suspect this is a universal problem. All general advice would be appreciated. Perhaps a stored procedure is not the way to go. -- A better way of running series of SAS programs: http://overlook.homelinux.net/wilsonwiki/SasAndMakefiles -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]