获取超表上索引使用的磁盘空间,包括在所有数据块上提供索引所需的磁盘空间。大小以字节为单位报告。

有关使用超表的更多信息,包括数据块大小分区,请参阅超表部分

名称类型描述
index_nameREGCLASS超表上索引的名称
类型描述
hypertable_index_sizeBIGINT返回索引使用的磁盘空间
注意

如果函数在非超表关系上执行,则返回 NULL。

获取超表上特定索引的大小。

\d conditions_table
Table "public.conditions_table"
Column | Type | Collation | Nullable | Default
--------+--------------------------+-----------+----------+---------
time | timestamp with time zone | | not null |
device | integer | | |
volume | integer | | |
Indexes:
"second_index" btree ("time")
"test_table_time_idx" btree ("time" DESC)
"third_index" btree ("time")
SELECT hypertable_index_size('second_index');
hypertable_index_size
-----------------------
163840
SELECT pg_size_pretty(hypertable_index_size('second_index'));
pg_size_pretty
----------------
160 kB

关键词

在此页面上发现问题?报告问题 或 编辑此页 在 GitHub 上。