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

Add invalid indexes #36

Closed
ankane opened this issue Oct 16, 2015 · 0 comments
Closed

Add invalid indexes #36

ankane opened this issue Oct 16, 2015 · 0 comments

Comments

@ankane
Copy link
Owner

ankane commented Oct 16, 2015

http://stackoverflow.com/questions/2102136/what-are-the-available-options-to-identify-and-remove-the-invalid-objects-in-pos

SELECT n.nspname, c.relname
FROM   pg_catalog.pg_class c, pg_catalog.pg_namespace n,
       pg_catalog.pg_index i
WHERE  (i.indisvalid = false OR i.indisready = false) AND
       i.indexrelid = c.oid AND c.relnamespace = n.oid AND
       n.nspname != 'pg_catalog' AND
       n.nspname != 'information_schema' AND
       n.nspname != 'pg_toast'
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