OptimizeQL is an AI-powered SQL query optimizer that analyzes execution plans and suggests improvements. With features like EXPLAIN analysis, multi-provider LLM support, and actionable indexing suggestions, it enhances database performance and efficiency. Ready to streamline SQL management with encrypted credential storage and a no-connection mode for quick optimizations.
OptimizeQL is an AI-powered SQL query optimizer designed to enhance database performance through intelligent analysis. By analyzing EXPLAIN plans, OptimizeQL provides actionable recommendations for indexing, query rewriting, and configuration adjustments, helping users to optimize their SQL queries effectively.
Key Features
- EXPLAIN ANALYZE Introspection: Automatically connects to PostgreSQL or MySQL databases to run EXPLAIN ANALYZE, gathering schema, index, and column statistics seamlessly.
- Multi-Provider LLM Analysis: Supports multiple large language model providers including Anthropic, OpenAI, Gemini, and others, offering flexibility in query optimization.
- Actionable Suggestions: Generates practical recommendations such as
CREATE INDEXstatements, query rewrites, statistics suggestions, and configuration tuning insights, along with estimated impact levels for each action. - Encrypted Credential Storage: Ensures the security of all database passwords and API keys by encrypting them with Fernet before storage.
- No-Connection Mode: Enables users to paste any SQL query to receive optimization suggestions without needing to connect to a live database.
- Query History: Maintains a searchable history of all analyses performed, allowing users to reference past optimization efforts.
- Dockerized Deployment: Offers a streamlined deployment process using Docker, allowing for a quick and efficient setup with minimal dependencies.
Tech Stack
- Backend: Built with Python 3.12, FastAPI, SQLAlchemy, and SQLite.
- Frontend: Utilizes Next.js 16, React 19, TypeScript, and Tailwind CSS for a responsive and interactive user interface.
- Containerization: Fully dockerized using Docker and Docker Compose for simplified management and scalability.
- SQL Parsing: Implements
sqlglotfor efficient SQL analysis and extracting query structures. - Encryption: Uses
cryptographyfor secure credential storage and management.
Interactive API
The project includes interactive API documentation available via:
- Swagger UI: Accessible at
[http://localhost:8000/docs](http://localhost:8000/docs) - ReDoc: Accessible at
[http://localhost:8000/redoc](http://localhost:8000/redoc)
Contribution Guidelines
Contributions to OptimizeQL are encouraged and can be made by forking the repository and following the established workflow. Adhering to existing code patterns and best practices will help maintain project quality and coherence. For anyone interested in contributing, detailed guidelines are provided in the repository.
No comments yet.
Sign in to be the first to comment.