This is a python project that collects statistics about SQL queries rendered with SQLAlchemy ORM with a SQLite database and save them in a json file "results.json".
Collected data are :
- Database Type
- Database Name
- Connection Open Time
- SQL Query
- SQL Table
- SQL Query Type (SELECT, DELETE, UPDATE, INSERT etc...)
- Query Time
- Row Count
This project can help in profiling SQL queries and optimizing them. It can be used with any SQL database.
SQLAlchemy is an open-source SQL toolkit and object-relational mapper for the Python programming language.
It is highly recommended to use a Python virtual enrionment.
This commande should be launched only once
python -m venv venvThis command should be launch every time you start your PC
venv\scripts\activate$env:FLASK_APP = "runner.py"
pip install -r requirements.txt
flask run
deactivate