How to store click counts by date
Posted 03 July 2006 - 04:16 PM
What is the best way to store this data in a database?
I was thinking have a table with 3 columns. The columns would be:
Item_ID, Date, Click_Count
When it is clicked then it would check if there is already a date with that item it. If there is then update the row if not insert a new row with the date.
Is this a suitable method?
I want to make sure the method I use is suitable because at a later stage this could be dealing with 20,000+ items.
Posted 03 July 2006 - 04:37 PM
So for example... lets say if there were 20,000 items which have been there for 3 years... which is 1095 days. That would mean 21,900,000 rows.
That doesnt sound too efficient to me...
Posted 03 July 2006 - 04:51 PM
Also, you could make it so that the script creates a new table if there are to many rows in the current one? easy job right?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users