# 合并页面浏览报告的数据存储在哪些数据库表中？

**URL:** <https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792>\
**Category:** Data & reporting\
**Created:** [2020年十月30日 20:46 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792 "2020-10-30T20:46:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![olegbc1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olegbc1/32/154008_2.png) [@olegbc1](https://meta.discourse.org/u/olegbc1)\
**Post date:** [2020年十月30日 20:46 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792/1 "2020-10-30T20:46:33Z")

</div>

有人知道 Consolidated Pageviews 报告（`*/admin/reports/consolidated_page_views`）中显示的数据存储在哪个 PostgreSQL 表中吗？

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2020年十一月2日 18:33 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792/2 "2020-11-02T18:33:18Z")

</div>

合并页面浏览量报告的数据来自 `application_requests` 表。

---

<div class="post-metadata">

**Author:** ![olegbc1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olegbc1/32/154008_2.png) [@olegbc1](https://meta.discourse.org/u/olegbc1)\
**Post date:** [2020年十一月2日 19:16 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792/3 "2020-11-02T19:16:07Z")

</div>

@simon 非常感谢！`req_type` 列中的数字是否对应如下请求类型：

0 = http\_total  
1 = http\_2xx  
2 = http\_background  
3 = http\_3xx  
4 = http\_4xx  
5 = http\_5xx  
6 = page\_view\_crawler  
7 = page\_view\_logged\_in  
8 = page\_view\_anon  
9 = page\_view\_logged\_in\_mobile  
10 = page\_view\_anon\_mobile

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2020年十一月2日 19:22 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792/4 "2020-11-02T19:22:04Z")

</div>

是的，这些就是 `req_type` 数字的含义。您可以在 Rails 控制台中运行 `ApplicationRequest.req_types` 来查看。

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2020年十二月2日 19:32 UTC](https://meta.discourse.org/t/which-tables-is-the-data-for-consolidated-pageviews-report-stored/168792/5 "2020-12-02T19:32:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
