Download the PHP package sapronovps/pgsqlindexanalyzer without Composer
On this page you can find all versions of the php package sapronovps/pgsqlindexanalyzer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sapronovps/pgsqlindexanalyzer
More information about sapronovps/pgsqlindexanalyzer
Files in sapronovps/pgsqlindexanalyzer
Package pgsqlindexanalyzer
Short Description PgsqlIndexAnalyzer - it's a simple PHP library, which help support indexes in your postgresql database.
License MIT
Informations about the package pgsqlindexanalyzer
Postgresql index analyzer
Introduction
PgsqlIndexAnalyzer - it's a simple PHP library, which help support indexes in your postgresql database.
Attention! This library is of a recommendation nature. All the indexes obtained need to be analyzed.
You can use it to find the following indexes:
- All indexes by tables
- Unused indexes by tables
- Overlapping indexes by tables
- Indexes Contains In Other Indexes ByTables
Table of contents
- Installing
- Methods
- Usage
-
Tests
Installing
Methods
Library contains only 4 methods:
- allIndexesByTables - method return all indexes by tables.
- unusedIndexesByTables - method return unused indexes by tables. Unused indexes are determined by the parameter IndexScan = 0
- overlappingIndexesByTables - method return overlapping indexes by tables.
- indexesContainsInOtherIndexesByTables - method return indexes contains in other indexes by tables.
Usage
First you need to create an instance of the library and estimate the configuration.
Get all indexes by tables:
Get unused indexes by tables:
Unused indexes - it's indexes when parameter "IndexScan" === 0;
Get overlapping indexes by tables:
Overlapping indexes - in postgresql, indexes are read from left to right, so there are indexes that are redundant
and already contained in any existing index in strict left-to-right order. Usually such indexes can be deleted.
Get indexes contains in other indexes by tables:
Indexes contains in other indexes - this method is very similar to overlappingIndexesByTables, but this method
looks for redundant indexes without taking into account reading from left to right. Attention: such indexes can be deleted only
after a detailed analysis.
Tests
This library is covered by unit test and phpstan.
All versions of pgsqlindexanalyzer with dependencies
ext-pdo Version *