【发布时间】:2019-03-21 17:00:38
【问题描述】:
我的爱好计划数据库目前超过了 10,000 行的限制,这让我感到困惑,因为我有一个每小时计划的工作,可以提前清除旧行。
psql-extras 工具带报告了这一点:
heroku pg:index_usage -a my-app
relname | percent_of_times_index_used | rows_in_table
----------------+-----------------------------+---------------
table_one | 26 | 8710
table_two | Insufficient data | 1235
table_three | 73 | 637
table_four | 0 | 429
table_five | | 1
(5 rows)
所以这超出了限制......但是,当我 SELECT COUNT(*) 每个表中的行(这是我计划的工作所做的)时,我只能找到大约 8,000 行。
以table_one为例:
$ heroku psql -a my-app
--> Connecting to postgresql-my-db
psql (11.1, server 9.6.11)
SSL connection (protocol: TLSv1.2, ...)
Type "help" for help.
my-app::DATABASE=> SELECT COUNT(*) FROM table_one;
count
-------
5708
(1 row)
有谁知道这 3,000 多行是从哪里来的?
非常感谢。
【问题讨论】: