Interface IndexMaintenance
-
- All Superinterfaces:
HostAware
- All Known Implementing Classes:
IndexMaintenanceImpl
public interface IndexMaintenance extends HostAware
A set of diagnostics for collecting statistics about the health of tables and indexes on a specific host.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.List<DuplicatedIndexes>
getDuplicatedIndexes()
java.util.List<DuplicatedIndexes>
getDuplicatedIndexes(PgContext pgContext)
Returns duplicated (completely identical) indexes (candidates for deletion) on current host.default java.util.List<ForeignKey>
getForeignKeysNotCoveredWithIndex()
java.util.List<ForeignKey>
getForeignKeysNotCoveredWithIndex(PgContext pgContext)
Returns foreign keys without associated indexes (potential performance degradation) on current host.default java.util.List<IndexWithBloat>
getIndexesWithBloat()
Returns indexes that are bloated in the public schema.java.util.List<IndexWithBloat>
getIndexesWithBloat(PgContext pgContext)
Returns indexes that are bloated in the specified schema.default java.util.List<IndexWithNulls>
getIndexesWithNullValues()
java.util.List<IndexWithNulls>
getIndexesWithNullValues(PgContext pgContext)
Returns indexes that contain null values on current host.default java.util.List<DuplicatedIndexes>
getIntersectedIndexes()
java.util.List<DuplicatedIndexes>
getIntersectedIndexes(PgContext pgContext)
Returns intersected indexes (partially identical, candidates for deletion) on current host.default java.util.List<Index>
getInvalidIndexes()
Returns invalid (broken) indexes to be deleted or re-indexed on current host in the public schema.java.util.List<Index>
getInvalidIndexes(PgContext pgContext)
Returns invalid (broken) indexes to be deleted or re-indexed on current host with the specified schema.default java.util.List<UnusedIndex>
getPotentiallyUnusedIndexes()
java.util.List<UnusedIndex>
getPotentiallyUnusedIndexes(PgContext pgContext)
Returns potentially unused indexes (candidates for deletion) on current host.default java.util.List<TableWithBloat>
getTablesWithBloat()
Returns tables that are bloated in the public schema.java.util.List<TableWithBloat>
getTablesWithBloat(PgContext pgContext)
Returns tables that are bloated in the specified schema.default java.util.List<TableWithMissingIndex>
getTablesWithMissingIndexes()
java.util.List<TableWithMissingIndex>
getTablesWithMissingIndexes(PgContext pgContext)
Returns tables with potentially missing indexes (potential performance degradation) on current host.default java.util.List<Table>
getTablesWithoutPrimaryKey()
java.util.List<Table>
getTablesWithoutPrimaryKey(PgContext pgContext)
Returns tables without primary key on current host.
-
-
-
Method Detail
-
getInvalidIndexes
@Nonnull java.util.List<Index> getInvalidIndexes(@Nonnull PgContext pgContext)
Returns invalid (broken) indexes to be deleted or re-indexed on current host with the specified schema.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of invalid indexes
- See Also:
Index
-
getInvalidIndexes
@Nonnull default java.util.List<Index> getInvalidIndexes()
Returns invalid (broken) indexes to be deleted or re-indexed on current host in the public schema.- Returns:
- list of invalid indexes
- See Also:
Index
-
getDuplicatedIndexes
@Nonnull java.util.List<DuplicatedIndexes> getDuplicatedIndexes(@Nonnull PgContext pgContext)
Returns duplicated (completely identical) indexes (candidates for deletion) on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of duplicated indexes
-
getDuplicatedIndexes
@Nonnull default java.util.List<DuplicatedIndexes> getDuplicatedIndexes()
-
getIntersectedIndexes
@Nonnull java.util.List<DuplicatedIndexes> getIntersectedIndexes(@Nonnull PgContext pgContext)
Returns intersected indexes (partially identical, candidates for deletion) on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of intersected indexes
-
getIntersectedIndexes
@Nonnull default java.util.List<DuplicatedIndexes> getIntersectedIndexes()
-
getPotentiallyUnusedIndexes
@Nonnull java.util.List<UnusedIndex> getPotentiallyUnusedIndexes(@Nonnull PgContext pgContext)
Returns potentially unused indexes (candidates for deletion) on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of potentially unused indexes
-
getPotentiallyUnusedIndexes
@Nonnull default java.util.List<UnusedIndex> getPotentiallyUnusedIndexes()
-
getForeignKeysNotCoveredWithIndex
@Nonnull java.util.List<ForeignKey> getForeignKeysNotCoveredWithIndex(@Nonnull PgContext pgContext)
Returns foreign keys without associated indexes (potential performance degradation) on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of foreign keys without associated indexes
-
getForeignKeysNotCoveredWithIndex
@Nonnull default java.util.List<ForeignKey> getForeignKeysNotCoveredWithIndex()
-
getTablesWithMissingIndexes
@Nonnull java.util.List<TableWithMissingIndex> getTablesWithMissingIndexes(@Nonnull PgContext pgContext)
Returns tables with potentially missing indexes (potential performance degradation) on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of tables with potentially missing indexes
-
getTablesWithMissingIndexes
@Nonnull default java.util.List<TableWithMissingIndex> getTablesWithMissingIndexes()
-
getTablesWithoutPrimaryKey
@Nonnull java.util.List<Table> getTablesWithoutPrimaryKey(@Nonnull PgContext pgContext)
Returns tables without primary key on current host.Tables without primary key might become a huge problem when bloat occurs because pg_repack will not be able to process them.
- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of tables without primary key
-
getTablesWithoutPrimaryKey
@Nonnull default java.util.List<Table> getTablesWithoutPrimaryKey()
-
getIndexesWithNullValues
@Nonnull java.util.List<IndexWithNulls> getIndexesWithNullValues(@Nonnull PgContext pgContext)
Returns indexes that contain null values on current host.- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of indexes with null values
-
getIndexesWithNullValues
@Nonnull default java.util.List<IndexWithNulls> getIndexesWithNullValues()
-
getIndexesWithBloat
@Nonnull java.util.List<IndexWithBloat> getIndexesWithBloat(@Nonnull PgContext pgContext)
Returns indexes that are bloated in the specified schema.Note: The database user on whose behalf this method will be executed have to have read permissions for the corresponding tables.
- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of bloated indexes
-
getIndexesWithBloat
@Nonnull default java.util.List<IndexWithBloat> getIndexesWithBloat()
Returns indexes that are bloated in the public schema.Note: The database user on whose behalf this method will be executed have to have read permissions for the corresponding tables.
- Returns:
- list of bloated indexes
-
getTablesWithBloat
@Nonnull java.util.List<TableWithBloat> getTablesWithBloat(@Nonnull PgContext pgContext)
Returns tables that are bloated in the specified schema.Note: The database user on whose behalf this method will be executed have to have read permissions for the corresponding tables.
- Parameters:
pgContext
-PgContext
with the specified schema- Returns:
- list of bloated tables
-
getTablesWithBloat
@Nonnull default java.util.List<TableWithBloat> getTablesWithBloat()
Returns tables that are bloated in the public schema.Note: The database user on whose behalf this method will be executed have to have read permissions for the corresponding tables.
- Returns:
- list of bloated tables
-
-