# Topic\_views vs Topic.views

**URL:** <https://meta.discourse.org/t/topic-views-vs-topic-views/97175>\
**Category:** Development\
**Created:** [September 14, 2018, 8:25am UTC](https://meta.discourse.org/t/topic-views-vs-topic-views/97175 "2018-09-14T08:25:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [September 14, 2018, 8:25am UTC](https://meta.discourse.org/t/topic-views-vs-topic-views/97175/1 "2018-09-14T08:25:31Z")

</div>

When helping a client with a [data explorer](https://meta.discourse.org/t/32566?silent=true) query, they noticed a difference between the topic views returned by the query, and the number on the category topic list.

Where does the difference between

`SELECT COUNT(*) FROM topic_views WHERE topic_id = X`

and

`Topic.find(X).views`

come from?

---

_[View the full topic](https://meta.discourse.org/t/topic-views-vs-topic-views/97175)._
