query-plan-optimizer
Postgresql Statistics are vital for a good query plan. This library finds tables with large number of live tuples and tries to find related models with foreign key to the model and sets statistics for the field on destination model.
Installation
$ pip install psql-stat-optimizer
add psql_optimizer to your INSTALLED_APPS
usage:
Using full optimize command:
$ ./manage.py optimize_statistics
Valid Parameters:
- set_all: if passed as
Trueit sets for all founded models automatically - analyze_all: if passed as
Trueit analyzes all models after their statistics is changed - live_tup_count: the minimum number of n_live_tup to consider as a big table. default is 100000
- statistics: the statistics value you want to set to. default is 10000
Using statistics command:
$ ./manage.py set_statistics
Parameters:
- table: the target table name
- column: the target column
- statistics: the target statistics
TODO:
- remove time.sleep which is used for printing
- add command for analyze a table manually
Metadata
Release files for psql-stat-optimizer 0.0.45
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psql_stat_optimizer-0.0.45-py3-none-any.whl | Python 3 | none | any | Details for psql_stat_optimizer-0.0.45-py3-none-any.whl |
Release files / psql_stat_optimizer-0.0.45-py3-none-any.whl
| Download URL | psql_stat_optimizer-0.0.45-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03f0b12799a4596a0eec20a8b446ca0a44011d68532010f091f38b2366e8ee11
|
|
BLAKE2b-256 checksum How to use checksums |
1d5f91833c654058cbcb7e0bac82fa124f0fc23420a37e99f0f5fa3569849fa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for psql-stat-optimizer 0.0.45
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.