Hi,
I’m working on a project and now I want to implement statistics.
Simplified I want this:
A user access a profile page, this action is stored into a table.
id|user_id|profile_id|datetime.
This table can grow very large and query it gonne slow things down I think. So I thought that it would be enough to parse these records and count up the visits per day.
id|user_id|profile_id|visits|date
This table will become big, but only one record per day, per profile, that’s not really shocking. So queries will go faster.
Also I can empty the first table form time to time.
Is this a good approach? What is your strategy with statistics? Is there anything Yii can do for me to make things easier? I could not find a lot about statistics.
Or should I not worry about tables growing up to > 1 million records?