Hello.

For example, take almost any modern forum. When a message appears in a topic, it is marked with a distinctive color or the like (that is, as BE suggests that it has been updated). And for each user it is done individually. Question: how is this implemented? I thought through some options. But everywhere there is a huge table with over90000 entries. Are there more "elegant" ways? :)

Thank you in advance.

    1 answer 1

    90k is not huge. each message usually has a limited number of recipients. Accordingly, we create a linked table with three fields id (index) msg_id and user_id, into which we add records about the new message, after viewing we delete the record by index.

    • those. it's quite normal? - Baran
    • using the index, it will be pretty smart and quite normal. for example, on my 2.5kk records, the line on the index is deleted in 0.0003 seconds - FLK
    • clear, thank you :) - Baran