• 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

sbj

Well-known member
#1
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?
 

Xon

Well-known member
#2
Alerts are queried very often, and populate even more often. For me, MySQL is reporting an average row length of ~96 bytes for alerts.
 

Mike

XenForo developer
Staff member
#3
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

Well-known member
#4
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.
 

sbj

Well-known member
#5
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.
 

sbj

Well-known member
#7
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?
 

Mike

XenForo developer
Staff member
#8
Unviewed alerts do not expire.
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.)

Or does it make not much difference to have 2-3 alerts stored or 500-600?
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

Well-known member
#9
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.)
Sorry if my assumption was not correct. I understood this:
upload_2015-4-2_23-30-8.png
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.

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.
Ah, nice information. Thank you.