PHPackages                             sapronovps/pgsqlindexanalyzer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. sapronovps/pgsqlindexanalyzer

ActiveLibrary[Database &amp; ORM](/categories/database)

sapronovps/pgsqlindexanalyzer
=============================

PgsqlIndexAnalyzer - it's a simple PHP library, which help support indexes in your postgresql database.

1.0.0(3y ago)25MITPHPPHP &gt;=8.0

Since Jan 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Sapronovps/pgsql-index-analyzer)[ Packagist](https://packagist.org/packages/sapronovps/pgsqlindexanalyzer)[ RSS](/packages/sapronovps-pgsqlindexanalyzer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Postgresql index analyzer
=========================

[](#postgresql-index-analyzer)

Introduction
------------

[](#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
=================

[](#table-of-contents)

---

1. [Installing](#installing)
2. [Methods](#methods)
3. [Usage](#usage)
4. [Tests](#tests)

---

Installing
==========

[](#installing)

---

```
composer require sapronovps/pgsqlindexanalyzer --dev
```

Methods
=======

[](#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
=====

[](#usage)

---

First you need to create an instance of the library and estimate the configuration.

```
