Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns only 1 index on the table with the data #4

Open
replyvishu opened this issue Jun 2, 2017 · 2 comments
Open

Returns only 1 index on the table with the data #4

replyvishu opened this issue Jun 2, 2017 · 2 comments

Comments

@replyvishu
Copy link

The query returns bloat and size information only on one index of the table even if tables has multiple indexes.

@qdw
Copy link
Contributor

qdw commented Jun 2, 2017

The query in index_bloat_check.sql shows only indexes that are over 10MB in size and over 50% bloat. That might be the reason you're seeing only one index.

If you want to see all indexes, you can edit index_bloat_check.sql and remove this line:

WHERE ( bloat_pct > 50 and bloat_mb > 10 )

Please let me know whether that fixes your issue or not. Thanks!

@replyvishu
Copy link
Author

I am sorry if the description of the issue was not very explanatory. The issue is even if table has multiple indexes on it , the index_bloat_check.sql script shows only one index on the table even if other indexes in the same table matches the criteria.

I had to remove the clause 'AND pg_attribute.attnum = ind_atts.attnum' to get all index information on the table that matches the criteria.

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

No branches or pull requests

2 participants