SQL model optimization question

Posted by supermogx on Stack Overflow See other posts from Stack Overflow or by supermogx
Published on 2010-04-13T01:31:30Z Indexed on 2010/04/13 1:32 UTC
Read the original article Hit count: 397

Filed under:
|

I need to keep track of number of "hits" on a particular item in a DB. The thing is that the "hits" should stay unique with a user ID, so if a user hits the item 3 times, it should still count for a hit of 1.

Also, I need to display the total number of hits for a particular item.

Is there a better way than to store each hits for each items by each users in a separate table? Would keeping the user ID in a string separated by commas a better and efficient way?

© Stack Overflow or respective owner

Related posts about sql

Related posts about model