romulusFR / py-sql-bencher

Command line SQL queries performance comparator written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

py-sql-bencher

Command line SQL queries performance comparator written in Python.

See https://realpython.com/python-application-layouts/ for the directory structure and https://python-packaging.readthedocs.io/en/latest/index.html.

Supports only https://www.postgresql.org/.

Installation

If you plan to fork or modify code, use pip install in editable (developer) mode using the venv virtual environment:

git clone git@github.com:romulusFR/py-sql-bencher.git
cd py-sql-bencher/
python3 -m venv .venv
. .venv/bin/activate
pip install --editable .

Otherwise, in a demo virtual environment:

mkdir demo
cd demo
python3 -m venv .venv
. .venv/bin/activate
pip install git+https://github.com/romulusFR/py-sql-bencher

Usage

Executable is .venv/bin/py-sql-bencher. Connection has to be defined in ./.env dotfile or via PostgresSQL's environment variables, see 34.15. Environment Variables.

# using examples
py-sql-bencher -vv  examples/agg_*.sql

About

Command line SQL queries performance comparator written in Python

License:GNU General Public License v3.0


Languages

Language:Python 100.0%