The discussion revolves around unexpected 1ms views in the post_timings table. mcwumbly noticed 3,515 entries with 1 millisecond view times, primarily linked to an ‘auto close’ post in an old topic. Mittineague confirmed similar findings on their local setup, suspecting the system generates these quickly. neil clarified that these 1ms views occur when a topic is auto-closed, as a system-generated post marks the closure and is instantly marked as read by users who have already viewed all other posts, resulting in a 1ms read time.
While working on this query, I noticed that there were some posts that had a number of 1 millisecond views
select count(1) as tiny_views
from post_timings
where msecs = 1
# tiny_views: 3515
I first noticed about 30 of these views on an “auto close” post in an old topic. That post was created in the last week, and at least one of those views is from a user who has not logged in since June.
Any idea what may be causing those post timing entries?
If I change the query to show anything with less than 100ms, the count doesn’t go up too much:
select count(1) as tiny_views
from post_timings
where msecs < 100
# tiny_views: 3568
…so there seems to be something special about these 1msec entries:
This is being done when a topic is being autoclosed (here). When a topic auto-closes, a new post is made to say that the post was automatically closed. Normally that post will be shown as unread, which can be annoying to everyone who has read all the other posts in the topic. So we mark the autoclose post as read by anyone who read all the real posts, and give it a 1 ms read time.
So if you have a lot of auto-closed topics, you’ll see those 1 ms post timing records.