Postgresql Set Statistics
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psql_stat_optimizer-0.0.45-py3-none-any.whl.
File metadata
- Download URL: psql_stat_optimizer-0.0.45-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f0b12799a4596a0eec20a8b446ca0a44011d68532010f091f38b2366e8ee11
|
|
| MD5 |
f93cc974f15c2cf6308b37f157272d27
|
|
| BLAKE2b-256 |
1d5f91833c654058cbcb7e0bac82fa124f0fc23420a37e99f0f5fa3569849fa5
|