Samples
Get size of a specific index on a .Arguments
The syntax is:Returns
If the function is executed on a non- relation,
NULL is returned.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the disk space used by a hypertable index
\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
SELECT hypertable_index_size('<index_name>');
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
index_name | REGCLASS | - | ✔ | Name of the index on a hypertable |
| Column | Type | Description |
|---|---|---|
| hypertable_index_size | BIGINT | Returns the disk space used by the index |
NULL is returned.