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

Improve index check speed #11

Open
keithf4 opened this issue Mar 5, 2018 · 0 comments
Open

Improve index check speed #11

keithf4 opened this issue Mar 5, 2018 · 0 comments

Comments

@keithf4
Copy link
Owner

keithf4 commented Mar 5, 2018

Creating an issue to document some discussions I've had about improving index check speed by using pgstatindex().

empty_pages/deleted_pages account for entire pages that are "bloat"
avg_leaf_density provides a % free value for leaf pages that have tuples in them

The number of "internal_pages" as a function of the index size could also be used to find issues where a reindex would be recommended. Would likely have to be a trended metric and then compare numbers before/after a reindex to see when it would be recommended again in the future.

Provide additional columns returned by pgstatindex in the index stats table. May not use them all in the most common output, but if pgstatindex() is already being run, it can at least provide those stats for other use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant