Forum and read tag

T

ThunderMusic

Hi,
I'm currently developping a forum for my web site and I wanted to include a
"read tag" feature to it. This forum stores it's data in a SQL Server 2005
database. I've seen on my forums that when you log-in as a registered user,
you have forums marked with a special icon or color if there are new
messages to the forum.

What is the best way to achieve that?
1) Log the last time the user logged on to the forum and flag the forum
posts according to this
this solution is low cost on SQL resources, if I want to log the last
time the user logged in, then after I logged, all messages will be marked as
read, which is not what I want. So, it would mean I'd have to include a
buffer time so everything posted since the last time the user logged is
marked as unread for like 10 minues after he logged, or so... but then
again, if there are many posts and the user takes 30 minutes to go over
them, it still does not do what I need it to do.
2) Keep a track of all the threads the user went in and log the date time it
went in, so we can check the next time
this solution is very heavy on sql resources, because it could generate
millions of "log rows", but it ensure that the user read the new posts.

Is there another way to go?

thanks

ThunderMusic
 
G

Guest

2) Keep a track of all the threads the user went in and log the date time it
went in, so we can check the next time
this solution is very heavy on sql resources, because it could generate
millions of "log rows", but it ensure that the user read the new posts.

To have millions of "log rows" you would need a tens of thousands of
users. A million of rows is nothing for SQL Server (if you don't care
about size of the database)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top