hi, i have a need for inserting into a table very frequently (several 1000s of records per minute). now, at the end of every hour or so, i need to tally the records in the first table, put ONLY the counts into a second table, and then delete the thousands of entries in the first one which are used only for counting.
what is the best way to do this? i am thinking of an hourly cron job, which will loop thru all the records in the first table, count them and then do the necessary INSERT or UPDATE actions for the main (second) table. after this, all entries in the first table get truncated. ok, not "all" entries but entries that were before the time this cron job started (because as we were running this procedure, more records may have been added) is this approach alright? 1. how will deleting and adding often (24 times a day, everyday) affect performance or table space. more likelihood of corruption etc? 2. should i use temp tables in any way instead of storing the variables in perl and then collectively putting them together? what would be a good way to implement the above logic? i'd appreciate any insight or thoughts. thanks/erick -- sql, query __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php