-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into nadeesha/data-connect…
…or-mysql
- Loading branch information
Showing
13 changed files
with
863 additions
and
53 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
history.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<p align="center"> | ||
<img src="https://a.inferable.ai/logo-hex.png" width="200" style="border-radius: 10px" /> | ||
</p> | ||
|
||
# @inferable/pg-stat-analysis | ||
|
||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
|
||
## Overview | ||
|
||
`@inferable/pg-stat-analysis` is an analytical agent designed to evaluate and improve the performance of your PostgreSQL database through recommendations based on access patterns. The agent provides suggestions such as creating indexes or other optimization strategies to enhance query performance. It makes use of the `pg_stat_statements` extension to provide data-driven recommendations. | ||
|
||
## Prerequisites | ||
|
||
- **Node.js** - Ensure you have Node.js installed. | ||
- **PostgreSQL** - A running PostgreSQL instance with the `pg_stat_statements` [extension enabled](https://www.postgresql.org/docs/current/pgstatstatements.html). | ||
- **Data Connector** - This projects assumes you are runnign the [Inferable Data Connector](https://github.com/inferablehq/inferable/tree/main/data-connector) which provides the connection to your database. | ||
|
||
## Installation | ||
|
||
1. **Install Dependencies:** | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
2. **Environment Setup:** | ||
|
||
Create a `.env` file in the project root with the following variable: | ||
|
||
``` | ||
INFERABLE_API_SECRET=your_inferable_api_secret | ||
``` | ||
|
||
Replace `your_inferable_api_secret` with your Cluster's [API secret](https://docs.inferable.ai/pages/auth#cluster-api-keys). | ||
|
||
## Usage | ||
|
||
Once the environment is set up, you can run the project in development mode using the following command: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
This will initiate the agent, which will analyze your database and provide performance-enhancing recommendations stored in `history.json`. | ||
Multiple runs will append to the existing data in `history.json`. | ||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please feel free to submit a Pull Request. | ||
|
||
## Support | ||
|
||
If you have any questions or issues, please open an issue on this repository. |
Oops, something went wrong.