1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Storing alerts and read marking data

Discussion in 'XenForo Questions and Support' started by sbj, Jan 14, 2015.

  1. sbj

    sbj Well-Known Member

    1) We can choose how many days to retain alerts.
    I was thinking of 30 days or more (maybe indefinite), but want to know how much alerts storing affects the server.
    Is it just having of more kilobytes for the server (database), or does it indeed slow the server in some kind of way?

    2) The same question about read marking data. For this I wanted choose 90 days or maybe indefinite time.
    How much or how does this affect the server?
  2. Xon

    Xon Well-Known Member

    Alerts are queried very often, and populate even more often. For me, MySQL is reporting an average row length of ~96 bytes for alerts.
    sbj likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    Storing read data for a very long time may also cause performance issues as your forum grows, though it really depends how big it is. (Depends more how busy your forum is than how many rows in the read marking table.)
    sbj and Xon like this.
  4. sbj

    sbj Well-Known Member

    I see, so both have a lot of queries if I store them for a long time. Thanks.

    I will go then with 7 days for alerts and 60 days with read marking data.
  5. sbj

    sbj Well-Known Member

    Back to this topic.

    Is there a way to set a limit for alerts? Let's say 999? So a user can have at most 999 alerts stored.
  6. Mike

    Mike XenForo Developer Staff Member

    That would require custom developments. The built-in system is just date based.
  7. sbj

    sbj Well-Known Member

    Unviewed alerts do not expire. I think this could be an issue when many users have many alerts.
    I assume this could slow down the server, right?
    Can I know why Xenforo doesn't have a built-in limit, because almost there is for everything a limit, but not for unviewed alerts?
    Or does it make not much difference to have 2-3 alerts stored or 500-600?
  8. Mike

    Mike XenForo Developer Staff Member

    That's not a correct premise though. They are always removed after 30 days. (Read alerts are deleted a configurable amount of time after they are read.)

    Unlikely to make any substantial difference. For a bit of perspective, we currently have ~27,000 alerts in the DB (we maintain read alerts for 4 days). In the grand scheme of things, a table with 27,000 rows is rather small.
    sbj likes this.
  9. sbj

    sbj Well-Known Member

    Sorry if my assumption was not correct. I understood this:
    as that only viewed alerts will be removed after xx amount of days. As stated in the description, unviewed alerts do not expire, so I thought they won't get deleted at all (as they do not expire).
    But it is great, if they are always removed after 30 days. Thank you. This is great.

    Ah, nice information. Thank you.

Share This Page