Calculate and show total Disk Space for partitioned tables in PostgreSQL table list
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 188
Description
**Is your feature request related to a problem? Please describe.**
For now the "Row Count Estimate" column shows "-1" for partitioned tables in the table list in the PostgreSQL schema properties window.
**Describe the solution you'd like**
Calculate the sum of row count estimates of all partitions of a table and show it in the table list.
**Describe alternatives you've considered**
Using this query:
```
SELECT
parent.relname AS parent_table,
sum(child.reltuples) as total_row_count
FROM
pg_namespace parent_ns
JOIN
pg_class parent ON parent.relnamespace = parent_ns.oid
JOIN
pg_inherits i ON parent.oid = i.inhparent
JOIN
pg_class child ON i.inhrelid = child.oid
JOIN
pg_namespace child_ns ON child.relnamespace = child_ns.oid
WHERE
parent_ns.nspname = 'myschema'
and parent.relkind!='I'
group by parent.relname;
```
Contributor guide
Assessment
This issue has not been assessed yet.