pg-index-health-sql
pg-index-health-sql copied to clipboard
pg-index-health-sql is a set of sql-queries for analyzing and maintaining indexes and tables health in Postgresql databases.
pg-index-health-sql
pg-index-health-sql is a set of sql-queries for analyzing and maintaining indexes and tables health in Postgresql databases.
Supported PostgreSQL versions
Support for previous versions of PostgreSQL
Compatibility with PostgreSQL versions 9.6, 10 and 11 is no longer guaranteed, but it is very likely.
We focus only on the currently maintained versions of PostgreSQL.
For more information please see PostgreSQL Versioning Policy.
Available checks
pg-index-health-sql allows you to detect the following problems:
- Invalid (broken) indexes (sql).
- Duplicated (completely identical) indexes (sql).
- Intersected (partially identical) indexes (sql).
- Unused indexes (sql).
- Foreign keys without associated indexes (sql).
- Indexes with null values (sql).
- Tables with missing indexes (sql).
- Tables without primary key (sql).
- Indexes bloat (sql).
- Tables bloat (sql).
- Tables without description (sql).
- Columns without description (sql).
- Columns with json type (sql).
- Columns of serial types that are not primary keys (sql).
- Functions without description (sql).
Local development
Linting
To run super-linter locally
docker run \
-e RUN_LOCAL=true \
-e USE_FIND_ALGORITHM=true \
-e VALIDATE_ALL_CODEBASE=false \
-e VALIDATE_SQLFLUFF=true \
-v $(pwd):/tmp/lint \
github/super-linter:slim-v5