# Is \`topic\_users.last\_visited\_at\` supposed to be updated on every visit?

**URL:** <https://meta.discourse.org/t/is-topic-users-last-visited-at-supposed-to-be-updated-on-every-visit/42164>\
**Category:** Development\
**Created:** [07.Апрель.2016 04:47:19 UTC](https://meta.discourse.org/t/is-topic-users-last-visited-at-supposed-to-be-updated-on-every-visit/42164 "2016-04-07T04:47:19Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [07.Апрель.2016 04:47:19 UTC](https://meta.discourse.org/t/is-topic-users-last-visited-at-supposed-to-be-updated-on-every-visit/42164/1 "2016-04-07T04:47:19Z")

</div>

Am I completely misunderstanding entirely what these values are for?

I’ve been using [Data Explorer](https://meta.discourse.org/t/32566?silent=true) to review activity and noted that `topic_users.last_visited_at` didn’t seem to be updating / showing topics I have recently visited.

Is `topic_users.last_visited_at` supposed to be updated on every visit to a topic?

Here is the Query I was using with [Data Explorer](https://meta.discourse.org/t/32566?silent=true).

```SQL
-- [params]
-- int :user_id = 1

SELECT
    topic_id,
    last_visited_at,
    first_visited_at
from topic_users
WHERE
    user_id = :user_id
ORDER BY
    topic_users.last_visited_at DESC

```

When this is executed I see NULL’s for topics I have visited and even some I have created:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/f/2f9ae3a08bede6131fd5af894d5b1bd4cfb7cbbe.png)

Scrolling down further to get to some dates I see:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/0/c035d1bf5bfea9f17a697d38558de51822149d3e.png)

Where I have visited each of these topics today 2016-04-07, however it looks like only the first visit was stamped.

So are `last_visited_at` and `first_visited_at` updated correctly - or am I just misunderstanding entirely what these values are for?

Is there a timestamp that’s updated when a user visits a topic?

---

_[View the full topic](https://meta.discourse.org/t/is-topic-users-last-visited-at-supposed-to-be-updated-on-every-visit/42164)._
