Hi,
I have a 10 column table tracking stats for 10,000+ songs using statements such as "playcounter=playcounter + 1".
DAILY_STATS (condensed version)
stat_date - PRI KEY
songid - PRI KEY
plays
downloads...
Every night a cron will INSERT/SELECT this into an identical table called WEEKLY STATS.
What's the best strategy for resetting the first table? If I TRUNCATE it then I have to use conditions all day to decide INSERT or UPDATE. I could TRUNCATE and then refill it with only the songids, or I could leave all rows intact and set the other columns to "". What would you recommend? Thanks.