Primary Authors
@wesleykendall (Wes Kendall)
@tomage (Tómas Árni Jónasson)
Commands and models for tracking internal postgres stats.
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](http://www.celeryproject.org/).
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.
Install django-pgstats with:
pip3 install django-pgstats
After this, add pgstats to the INSTALLED_APPS setting of your Django project.
For information on setting up django-pgstats for development and contributing changes, view CONTRIBUTING.rst.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8f43ae3783e63f79ac7226b03873a95d7af6fab58e86d3881305cdaab12cc3b |
|
MD5 | 22ca2870b72c7c193d3518da123f56b2 |
|
BLAKE2b-256 | 0d898f1f7264b744bf413acbebafed22ab27578b1915c8b7dba53c36010dc3a6 |