Skip to content

SQL-Lifecycle-Management is an intelligent diagnosis and optimization product focusing on the SQL field.

License

Notifications You must be signed in to change notification settings

oceanbase/sql-lifecycle-management

SQL-Lifecycle-Management

English | 简体中文

License pyversions Github stars OpenIssue

SQL-Lifecycle-Management is a SQL lifecycle management product hatched from the Ant group, providing SQL closed-loop capabilities throughout all stages of develop, integration, operation and maintenance, and continuous optimization.

Main Features

  • SQL Optimization:Support SQL optimization, provide index suggestion, PMD suggestion, rewrite and other capabilities
  • SQL Review:Support SQL Review of multiple ORM framework
  • Slow log Analysis:Support Slow log analysis
  • SQL Monitor:Provides SQL monitoring services of different engines, collects SQL, Plan, Catalog, Statistics and other data to help developers analyze SQL problems in real time

Currently Supported Database Engine

  • OceanBase(MySQL Mode)
  • MySQL

Quick Start

Local installation

  • prerequisites: recommended python == v3.8 (tested on 3.8) It is recommended to use conda to create virtual environment
conda create --name slm_3.8 python=3.8
conda activate slm_3.8
  • install
git clone https://github.com/oceanbase/sql-lifecycle-management.git

cd sql-lifecycle-management && make install
  • meta database config
cd sql-lifecycle-management && vim db.cfg
  • meta database schema init
mysql -h host_ip -u user_name -p
source init/init.sql
  • visit web
cd sql-lifecycle-management && sh ./start.sh

visit https://localhost:8989

Deploy with docker

  • build
git clone https://github.com/oceanbase/sql-lifecycle-management.git
cd sql-lifecycle-management
docker build -t <your_tag> .
  • run
docker run -itd -p 8989:8989 <image_id> /bin/bash
docker exec -it <container_id> /bin/bash
  • meta database config
# in docker
vim db.cfg
  • meta database init
mysql -h host_ip -u user_name -p
source init/init.sql

If you don't have an existing metabase. you can also install mysql service locally using Docker

docker run --name=mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<your_password> -dit mysql:latest
  • visit web
sh ./start.sh

visit https://localhost:8989

Configuration

Please refer to the Configuration Guide for an overview on how to configure SQL-Lifecycle-Management. part guide:

Roadmap

  • Database engine extension
    • OceanBase
    • MySQL
    • PostgreSQL
    • Oracle
    • TiDB
    • PolarDB
  • Rule precipitation
    • SQL PMD
    • SQL Rewrite
    • Rule-Based Optimizer
  • Optimizer extension
    • Cost-Based Optimizer
    • Support PLSQL
    • Query-Based Workload Analysis
    • Learning-Based Optimizer
  • ORM framework extension
    • MyBatis
    • GORM
    • Hibernate
    • SQLAlchemy
  • Multi-cloud product access
    • OceanBase Cloud
    • Aliyun RDS
    • TiCloud
  • SQL optimization plugin
    • CICD product
    • SQL Console product
    • IDE plugin

License

SQL-Lifecycle-Management is licensed under Apache - 2.0 License.

Contact Us

DingTalk group: 33920014194