Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

BlueScope

Introduce science to SQL optimization.

Description

Profiles the performance of SQL queries by running the N times and measuring the time it takes to execute with minimizing any external reasons such as compilation time, queue time e.t.c.

How many times SQL query will be run is determined by confidence level and margin of error.

Compares results of 2 different queries using Student's t-test. Returns the result of the test (p-value) and the conclusion.

Table of currently supported databases:

Data Base Current status
Redshift Serverless Supported ✅
Redshift Dedicated In development ⏳
BigQuery Planned
PostgreSQL Planned
MySQL Planned

How to use

CLI

CLI is in development. For now, you can use the package in your code.

Package

To install package run pip install bluescope

To use the package in your code:

from bluescope import REDSHIFT_SERVERLESS
from bluescope import get_profiler
from bluescope.statsutils import find_significance

profiler_rs_cls = get_profiler(REDSHIFT_SERVERLESS)
profiler_rs = profiler_cls(host=*host*, port=*port*,
                           db=*db*, user=*user*,
                           password=*password*, agree=True)

pr_1 = profiler_rs.profile(*query_1*)
pr_2 = profiler_rs.profile(*query_2*)

p = find_significance(pr_1['mean'], pr_2['mean'],
                      pr_1['std'], pr_2['std'],
                      pr_1['sample_size'], pr_2['sample_size'])

How to contribute

Any ideas, comments, code improvements are very welcome.

To contribute to the project, please follow the steps:

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Push your changes to your branch
  5. Create a pull request
  6. Wait for the review

License

⚖️ GPL-3.0

Contact

Maintainer: Mirzabekian Arkadii 📧 Email

Metadata

Release files for BlueScope 1.0.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BlueScope 1.0.0b1
File Size Uploaded Provenance Actions
BlueScope-1.0.0b1.tar.gz 20.5 kB Without provenance Details for BlueScope-1.0.0b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for BlueScope 1.0.0b1
File Interpreter ABI Platform Actions
BlueScope-1.0.0b1-py3-none-any.whl Python 3 none any Details for BlueScope-1.0.0b1-py3-none-any.whl

Total release size: 40.0 kB

Release files / BlueScope-1.0.0b1.tar.gz

Download URL BlueScope-1.0.0b1.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f81f2c4d4c48723ec97fdd3266ca586797e3a78851722cdf7359a163929dd1ba
BLAKE2b-256 checksum
How to use checksums
bd85b257451b7b85753fbe23a245687bee1458848e68b4a5ef7e9395fd03d42a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / BlueScope-1.0.0b1-py3-none-any.whl

Download URL BlueScope-1.0.0b1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11fc1a215d13ea5ddf9c16be7e81b6a5431c15d0d13edc30b9d09f08b8de274c
BLAKE2b-256 checksum
How to use checksums
ea707de4629d32ef1d0f7fb1b2e24a275c6ebb99734520021da7680e555df129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for BlueScope 1.0.0b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page