Where to store users visited pages?

Posted by kofto4ka on Stack Overflow See other posts from Stack Overflow or by kofto4ka
Published on 2010-05-25T17:53:50Z Indexed on 2010/05/25 18:01 UTC
Read the original article Hit count: 140

Filed under:

Hi there. I have a project, where I have posts for example. The task is next: I must show to user his last posts visit. This is my solution: every time user visits new (for him) topic, I create a new record in table visits. Table visits has next structure: id, user_id, post_id, last_visit. Now my tables visits has ~14,000,000 records and its still growing every day.. May be my solution isnt optimal and exists another way how to store users visits? Its important to save every visit as standalone record, because I also have feature to select and use users visits. And I cant purge this table, because data could be needed later month, year. How I could optimize this situation?

© Stack Overflow or respective owner

Related posts about mysql