Skip to content

Show space usage for materialized views#485

Merged
ankane merged 1 commit into
ankane:masterfrom
fatkodima:show-space-for-matviews
Feb 20, 2024
Merged

Show space usage for materialized views#485
ankane merged 1 commit into
ankane:masterfrom
fatkodima:show-space-for-matviews

Conversation

@fatkodima
Copy link
Copy Markdown
Contributor

@fatkodima fatkodima commented Dec 15, 2023

Currently, the "Space" section contains space info only about tables and indexes, but not materialized views, even though that indexes for materialized views are already shown. This PR fixes that.

I have a few other improvement ideas to this gem:

  1. Add some info about indexes on columns having a very high NULL fraction (pg_stats.null_frac), or indexes on columns with a high % of the same value (pg_stats.most_common_freqs), or indexes on boolean columns? These indexes should be made partial or removed.
  2. Show also space occupied by partitioned tables.
  3. Add to the "Space" section for tables a column showing its size with all its indexes. Or this can be a clickable link from the "Space" section for tables that show a new view with this info and some other details

Can help with PRs.

@ankane ankane merged commit 20d9ffc into ankane:master Feb 20, 2024
@ankane
Copy link
Copy Markdown
Owner

ankane commented Feb 20, 2024

Thanks @fatkodima! Happy to include 2 as well.

@fatkodima fatkodima deleted the show-space-for-matviews branch February 20, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants