Skip to content

abeerpathela/AutoTune-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoTune-SQL

AutoTune-SQL is an AI and Machine Learning powered SQL optimization platform that helps developers analyze, optimize, and evaluate database queries before deployment.

The platform combines Large Language Models, Machine Learning-based risk assessment, query performance analysis, and an integrated SQL learning academy to create a complete environment for both query optimization and developer education.

🌐 Click the image below to visit the live AutoTune-SQL website and experience the platform firsthand.

image

AutoTune-SQL is designed to answer three critical questions:

  • Is this query correct?
  • Is this query efficient?
  • Is this query safe for production?

Overview

Modern applications often suffer from slow database performance due to inefficient SQL queries, missing indexes, expensive joins, poor filtering strategies, and scalability issues.

AutoTune-SQL addresses these challenges through:

  • AI-assisted query optimization
  • Machine Learning risk prediction
  • Query performance analysis
  • Intelligent SQL recommendations
  • Interactive SQL education and certification

The platform enables developers to improve database performance while simultaneously learning the concepts behind optimization decisions.


Key Features

AI-Powered Query Optimization

AutoTune-SQL leverages Large Language Models to analyze SQL queries and generate optimized alternatives.

Capabilities include:

  • Query rewriting
  • Optimization suggestions
  • Readability improvements
  • Best-practice recommendations
  • Production-grade SQL guidance

Machine Learning Risk Scoring

Custom ML models evaluate queries and estimate potential performance risks.

The system can identify:

  • Expensive scans
  • Poor filtering strategies
  • High-cost joins
  • Missing optimization opportunities
  • Potential scalability concerns

Query Analysis Engine

Developers receive detailed analysis including:

  • Performance diagnostics
  • Query structure evaluation
  • Optimization insights
  • Execution recommendations
  • Risk classification

Database Connectivity

  • PostgreSQL integration
  • Persistent database connections
  • Connection profile management
  • Secure credential storage

SQL Academy

The integrated academy provides structured learning through:

  • Progressive SQL modules
  • Topic-focused lessons
  • Interactive exercises
  • Practical query labs
  • Knowledge assessments
  • Progress tracking
  • Certification system

Certification Platform

Upon successful completion of the academy:

  • Progress is validated
  • Assessments are evaluated
  • Certificates are generated
  • Completion records are stored and verified

Technology Stack

Frontend

  • React
  • TypeScript
  • Vite
  • Tailwind CSS

Backend

  • Node.js
  • Express.js
  • Prisma ORM
  • Redis

Database

  • PostgreSQL

Artificial Intelligence

  • Groq API
  • Llama 3.3
  • Prompt Engineering
  • AI Query Analysis Pipeline

Machine Learning

  • Custom Risk Prediction Models
  • Query Classification
  • Performance Risk Scoring
  • Optimization Recommendation Engine

System Architecture

AutoTune-SQL follows a service-oriented architecture where:

  1. Users submit SQL queries.
  2. Queries are analyzed by the optimization engine.
  3. Machine Learning models evaluate risk levels.
  4. AI services generate optimization recommendations.
  5. Results are presented through an interactive dashboard.
  6. Users can learn underlying concepts through the SQL Academy.

This creates a feedback loop between optimization, learning, and performance improvement.


Local Development

Backend

cd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run dev

Frontend

cd frontend
npm install
npm run dev

Environment Variables

PORT=
DATABASE_URL=
REDIS_URL=
JWT_SECRET=
GROQ_API_KEY=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_CALLBACK_URL=

Author

Abeer Pathela

GitHub: https://github.com/abeerpathela

LinkedIn: https://www.linkedin.com/in/abeerpathela


AutoTune-SQL combines Artificial Intelligence, Machine Learning, and database engineering to help developers write faster, safer, and more efficient SQL.

About

An ML-powered middleware that intercepts slow SQL queries, uses regression models to predict execution times, and leverages a fine-tuned LLM to automatically rewrite inefficient code. Features Redis caching, connection pooling, and database replication for peak backend performance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors