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.5.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pg_index_insight-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 905605dc46924609e3fe84490664a34aec61c86288f67e655faaf7be4ea0f969
MD5 30fa1152fa0ba167ff0bca3bc0427dab
BLAKE2b-256 c0add141b8e25e2083a5fe7f6435901b3078c9ccb2bbccf4224eeb63b35064ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pg_index_insight-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 58abcade11e52b35c36c8479d4365909129fda5a1869c6847795e6e3949c8fa5
MD5 b66782c051222250b7a86f3907b6e675
BLAKE2b-256 0694612db1e2a57ef396b6f5b3c556a8e3dfbd7e4cb1c51eb83bd83ceb54a6be

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