Skip to main content

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.10 - 3.14, Django 4.2 - 6.0, Psycopg 2 - 3, and Postgres 14 - 18.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_pgstats-1.6.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pgstats-1.6.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file django_pgstats-1.6.0.tar.gz.

File metadata

  • Download URL: django_pgstats-1.6.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

File hashes

Hashes for django_pgstats-1.6.0.tar.gz
Algorithm Hash digest
SHA256 1c16f51b2848bdf3f33943e6750ec4a014048cb3ed3a47913ad713ccea2bee39
MD5 64197b781d9dc5e310eb38c12a9fae1f
BLAKE2b-256 4b860353ff15f8c39f2b4fdf6a515608e0f6edb236e5bf4074c52893a0e397e0

See more details on using hashes here.

File details

Details for the file django_pgstats-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: django_pgstats-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

File hashes

Hashes for django_pgstats-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4748df96669fed36f77702c553be0ba5b6ec4444d0c0bf0c5ed80c4388de242a
MD5 bac5b5fed8c38cc3f0dbf0c66537e596
BLAKE2b-256 ec62bf6bb5d00ff1d1d9bf6ab80ad795bf3593a81a621ace9b232099f87ecc59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page