Skip to main content

A CLI tool for analyzing PostgreSQL index efficiency

Project description

pg_index_insight

pg_index_insight is a command-line interface (CLI) tool designed to help PostgreSQL users analyze and improve the efficiency of their database indexes. This tool highlights inefficient indexes to optimize space utilization, vacuum operations, and overall database performance.

Why

pg_index_insight is designed to be a simple and effective tool for ensuring your PostgreSQL indexes are efficient. Here are a few reasons why you might prefer using this CLI tool:

  • No extensions required: Unlike some PostgreSQL performance tools, pg_index_insight does not require you to install any database extensions. This keeps your database clean and avoids the complexity of extension management.

  • Custom queries without hassle: With pg_index_insight, you can easily run queries to assess index efficiency without needing to modify or set up complex exporters like in Prometheus.

  • Straightforward: The tool is user-friendly and designed for simplicity. If you’re looking for a tool that allows you to inspect your database's indexes with minimal setup, this CLI will serve your needs well.

  • Portable: As a standalone CLI tool, you can run it on any environment where you have access to your PostgreSQL database. No additional software or extensive configurations are necessary.

Features

  • Analyze index usage and detect redundant indexes.
  • Generate reports on index efficiency.
  • Support for JSON export of results.
  • Easy-to-use command-line interface.

Requirements

  • Python 3.6 or higher
  • PostgreSQL 9.6 or higher
  • Required Python packages (listed in requirements.txt)

Installation

  1. Clone the repository:
   git clone https://github.com/yourusername/pg_index_insight.git
   cd pg_index_insight
  1. Set up a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

3.Install the required packages:

pip install -r requirements.txt
pip install -e .

Usage

To use pg_index_insight, simply run the following command in your terminal:

pg_index_insight [command] [options]
pg_index_insight list-invalid-indexes
pg_index_insight list-duplicate-indexes
pg_index_insight list-inefficient-or-redundant-indexes
pg_index_insight list-bloated-btree-indexes 

Contributing

Contributions are welcome! If you have suggestions for improvements or would like to report a bug, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create your feature branch:
git checkout -b feature/YourFeatureName
  1. Commit your changes:
git commit -m 'Add some feature'
  1. Push to the branch:
git push origin feature/YourFeatureName
  1. Open a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pg_index_insight-0.0.6.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

pg_index_insight-0.0.6-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file pg_index_insight-0.0.6.tar.gz.

File metadata

  • Download URL: pg_index_insight-0.0.6.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for pg_index_insight-0.0.6.tar.gz
Algorithm Hash digest
SHA256 958d9f4dfc71e01d9fedabe24e5e1732d4f32aabab2fcd87d4a93462ad1c39df
MD5 b37f555e4b55830f4908d391a08fe4a8
BLAKE2b-256 1e6498461ffbaf260464488ca9b74b75cf4cb3adae02a3b8ce25f3153e5ba04d

See more details on using hashes here.

File details

Details for the file pg_index_insight-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for pg_index_insight-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6eaec925b52984ff1207f393d46553bb09c718aaea3cf97a1e567acdc4c0cbc4
MD5 2ce9ee119cbf2cbd1d9c41837a922670
BLAKE2b-256 b6fc8dd69dda9c1669578de6b4fd08f8549912a7014a62bcc80f0bd364e8bada

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page