How about using upsert? ( Mysql way: insert into ... values (...) on duplicate key UPDATE )
Setup the unique keys on the table correctly, and upsert the data in there.
Summer Sale! All accounts are 50% off this week.
Hey guys,
I am aggregating sales data for analytics and write that into another database for later visualization. So here's the thing:
I'm thinking about the concept how to insert/update that data every night. There are 2 ways in my opinion:
or
The thing is that data can change. An entry inserted yesterday may be changes tomorrow and needs to be updated/inserted again in the next cycle.
So how would you guys go for that ? Any ideas or advises ?
Thanks Marc
Please or to participate in this conversation.