A CLI tool for analyzing PostgreSQL index efficiency
Project description
pgindexinsight
pgindexinsight is a command-line interface (CLI) tool designed to help PostgreSQL users analyze and optimize the efficiency of their database indexes. The tool highlights inefficient indexes, offering insights to improve space utilization, vacuum operations, and overall database performance without the need for external extensions or packages.
Why Choose pgindexinsight?
pgindexinsight offers a simple yet powerful way to ensure that your PostgreSQL indexes are running efficiently. Here are key reasons to choose this tool:
- No Extensions or Packages Required: Unlike other PostgreSQL performance tools, pgindexinsight doesn’t require the installation of any database extensions or other packages. It keeps your database setup clean and reduces complexity.
- No Need to Memorize Index Queries: The tool uses pre-defined queries to analyze your indexes, so you don’t have to recall or memorize the correct index analysis queries every time. This provides a hassle-free experience for database inspection.
- Minimal Setup: The tool is easy to install and use. Whether you're a beginner or a seasoned database administrator, pgindexinsight is designed to make index management intuitive and straightforward.
- Portable & Lightweight: As a standalone CLI tool, pgindexinsight can be run in any environment with PostgreSQL access. There’s no dependency on external software, so you can freely install or remove it whenever needed.
Key Features
- Index Usage Analysis: Detect redundant, unused, or bloated indexes and ensure your database operates efficiently.
- Comprehensive Reporting: Generate detailed reports on index health, usage, and redundancy.
- JSON Export Support: Easily export the results of your analyses in JSON format for further processing or integration with other systems.
- User-Friendly CLI: The tool is designed with ease of use in mind, allowing database administrators and developers to get started with minimal effort.
Benefits
- Keep your PostgreSQL database clean: No need to install or manage third-party database extensions.
- Flexible: Run the tool only when needed, and easily remove it afterward if no longer required.
- Empowers Database Administrators: Get valuable insights into your index usage to optimize performance and space, without any extra overhead.
Requirements
- Python 3.6 or higher
- PostgreSQL 12 or higher
- Required Python packages (listed in
requirements.txt
)
Installation
- Clone the repository:
git clone https://github.com/yourusername/pg_index_insight.git
cd pg_index_insight
- 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
Installation
pip3 install pg_index_insight
To use pg_index_insight, simply run the following command in your terminal:
pgindexinsight [command] [options]
pgindexinsight list-unused-or-old-indexes
pgindexinsight list-invalid-indexes
pgindexinsight list-duplicate-indexes
pgindexinsight list-inefficient-or-redundant-indexes
pgindexinsight 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.
- Fork the repository.
- Create your feature branch:
git checkout -b feature/YourFeatureName
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/YourFeatureName
- 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
Built Distribution
File details
Details for the file pg_index_insight-0.0.7.tar.gz
.
File metadata
- Download URL: pg_index_insight-0.0.7.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46373adf920f302fa416d14de6886c72168399bb0ac54f44e9b529d93dd65b44 |
|
MD5 | 335f2b0bfeb98fc8e2f37b57d2538906 |
|
BLAKE2b-256 | 39eaeb1e138412ec79d32b8e97ed81ed733cd535b66cd316d559b6187c523bb7 |
File details
Details for the file pg_index_insight-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: pg_index_insight-0.0.7-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee67b8f1e1599107bfaa1a40ab047c224a63d7747e858623fb61b6cc2e1103a1 |
|
MD5 | 21920e13c27c528163f03b0f17433106 |
|
BLAKE2b-256 | 11bb6096b3964591d0b2dbadf0c8d344b2d5fa911f7e9de26f5662cf928e4e01 |