Commands and models for tracking internal postgres stats.
Project description
django-pgstats
django-pgstats
provides commands and models for tracking internal postgres stats. Specifically, the IndexStats
model stores stats about postgres indices and the TableStats
model stores stats about postgres tables.
Postgres stat tables contain global statistical information. django-pgstats
is meant to be executed periodically so that one can later analyze table and index usage. This is done by periodically calling python manage.py snapshot_pgstats
using a task runner such as Celery.
Stats are stored as JSON fields in the respective IndexStats
and TableStats
models. Each key in the JSON field is in the format of {schema}.{table}
for table stats or {schema}.{table}.{index}
for index stats.
Compatibility
django-pgstats
is compatible with Python 3.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.
Documentation
View the django-pgstats docs here
Installation
Install django-pgstats
with:
pip3 install django-pgstats
After this, add pgstats
to the INSTALLED_APPS
setting of your Django project.
Contributing Guide
For information on setting up django-pgstats for development and contributing changes, view CONTRIBUTING.md.
Creators
- @wesleykendall (Wes Kendall)
- @tomage (Tómas Árni Jónasson)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_pgstats-1.5.0.tar.gz
.
File metadata
- Download URL: django_pgstats-1.5.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b306214dbc293571f65f82f4caf2c3b80d053d25c615ea0391d33bec3d274d89 |
|
MD5 | 2719d6ea054271ca497041dbf1a69206 |
|
BLAKE2b-256 | 0e08834d43c50ec876c919cdf0d0461c63150024fba3e28582fbed8dbb437142 |
File details
Details for the file django_pgstats-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: django_pgstats-1.5.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d884e31ce1c7afda7e134d120cd871438737fb9e05457ec955714e52c2a02d5a |
|
MD5 | 7a8967e8dc70b7431f84e7050a88dd63 |
|
BLAKE2b-256 | 0f59762a1e74b3f5be1684fc968aed6844bd1d04bd4771334bca4927e59f2154 |